Hi Akash
Not master anymore while waiting for replication - this most likely means that a step down occurred while waiting for replication
Where did you see this error message? I don’t believe this is an error from the server.
If you see this error from a driver, please post details on which driver and which driver version. Please also post your MongoDB server version.
Having said that, from the error message we may assume that your application is waiting for writeConcern to be satisfied. While the primary waits for write acknowledgement from the secondaries, it was forced to step down (either from the rs.stepDown()
command or it lost contact with the secondaries).
do we have a data loss if MongoWriteConcernException occurs
Could you post the writeConcern setting you use to perform the write? Different MongoDB versions have slightly different behaviour regarding this. Please see Acknowledgement Behaviour page for more details.
Best regards
Kevin