0

Working with mongodb replica set and i have configured everything and it was working fine. I didn't have a arbiter for it. Just a primary and secondary for backup purpose. Somehow secondary went down (I didn't see any specific info on log file about secondary went down). The issue here is primary trying t connect secondary and its failing.. and no write operation happening on primary and app broken. I didn't understand how primary stopped writing because secondary went down.

Any Thoughts?

primary log was showing "can't connect to slave server"

4

1 回答 1

0

w option:
A number greater than 1:

Guarantees that write operations have propagated successfully to the specified number of replica set members including the primary. If you set w to a number that is greater than the number of set members that hold data, MongoDB waits for the non-existent members to become available, which means MongoDB blocks indefinitely.

Please check this article in detail: specifically Internal operation of write concern: http://docs.mongodb.org/manual/core/write-operations/

于 2013-02-20T07:46:38.760 回答