-
Type: Bug
-
Resolution: Done
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: Replication
-
None
-
Fully Compatible
-
ALL
-
-
Repl 2016-08-29
-
0
The master determines the opTime that a slave has applied until based on the position of the slave's cursor. However, the slave will issue a getMore when no operations have been applied, which causes the master to believe the slave has advanced past the opTime in its initial query.
// apply operations { int n = 0; time_t saveLast = time(0); while (1) { // we need "&& n" to assure we actually process at least one op to get a sync // point recorded in the first place. const bool moreInitialSyncsPending = !addDbNextPass.empty() && n; if (moreInitialSyncsPending || !oplogReader.more()) { ... } ... }
I can reproduce this issue on MongoDB 2.6+ and didn't attempt to run the "Steps to reproduce" against any versions earlier than that.
- is related to
-
SERVER-27054 Slave can acknowledge write before initial sync is complete
- Closed