Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have this scenario, using version 2.2.2:

  • Node A, Primary, Priority: 10, Wireless network
  • Node B, Secondary, Priority: 9, VM Server1
  • Node C, Secondary, Priority: 8, VM Server1


  1. In Node A, insert {data:1}.
  2. Data gets replicated to Node B and Node C.
  3. Disconnect Node A from wireless network (We do not have enough infrastructure to simulate the network cable being pulled out from the machine, thus, I disconnect from the wireless network to hopefully achieve something similar).
  4. Node B becomes primary. Insert {data:2}.
  5. A quick check on Node C, data does not gets replicated. In Node C, I ran rs.syncFrom(Node B) but the data still doesn't get sync.

Am I missing something here because I am expecting that data will get replicated automatically from Node B to Node C after Node A is down.

[Edit] Note on further test:

  • If Node A, B and C is in the same VM, the data inserted in Node B does gets replicated to Node C. This issue seems to happen only when Node A gets disconnected from the wireless network.
  • I've also tried shutting down Node A in sequence number 3, instead of disconnecting it from the wireless network. When Node A is shut down, data inserted in Node B does get replicated to Node C. So again clearly this happens only when Node A is disconnected from the network. I am wondering if it is the same if the network cable is unplugged.
share|improve this question
Flagged in our chat so it gets attention. We need more NoSQL questions like this :-) – gbn Jan 31 '13 at 15:35
The more important question is to ask if you manually forced Node B to become primary or if an election was held, and if so, how long did you wait to write to Node B, and how long did you give to read from Node C? Also, what version of mongo? Don't forget it's called "eventual consistency", not "immediate consistency" so if it takes as long as 30s to replicate, that's not horrid. It is a problem, but you're using eventual consistency. – jcolebrand Jan 31 '13 at 15:36
@jcolebrand I've updated the question to be more specific to the scenario, hopefully drawing a clearer picture. I've waited definitely more than 30s, about 5 minutes I think. The election was not forced. It is automated. – allancth Feb 1 '13 at 1:37
are you using a write concern or calling get last error? - it would probably help if you wrote up exactly what you are doing so we can reproduce and comment on what is happening. It's almost impossible based on a description, need to see what is/is not making to the oplog, where the nodes are syncing from etc. – Adam C Feb 9 '13 at 22:37
Please provide us with rs.status() when node a is down and node B is primary. Also, how do you make sure that node B becomes primary? – Markus W Mahlberg Aug 13 '14 at 9:14

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.