我必须调用getLastError来确保写操作生效了么

答案解析

推荐用write concern机制,getLastError已过时。