MongoWriteConcernException

23 views
Skip to first unread message

Akash Sudhakar

unread,
Apr 20, 2018, 12:35:51 PM4/20/18
to mongodb-user
Getting this error - Not master anymore while waiting for replication - this most likely means that a step down occurred while waiting for replication
When does this issue occur. ??

Also do we have a data loss if MongoWriteConcernException occurs. or once replica server is up, data will be up to date.

Kevin Adistambha

unread,
May 23, 2018, 1:01:54 AM5/23/18
to mongodb-user

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

Reply all
Reply to author
Forward
0 new messages