[SERVER-31218] Test must wait for for slave to sync FCV document before using commands available only in FCV 3.6. Created: 22/Sep/17 Updated: 30/Oct/23 Resolved: 09/Nov/17 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.0-rc4 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Matthew Russotto | Assignee: | Matthew Russotto |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Backwards Compatibility: | Fully Compatible |
| Operating System: | ALL |
| Sprint: | Repl 2017-12-04 |
| Participants: |
| Description |
|
Starting a master using ReplTest.start(true) results in a master running with FCV 3.6. Starting a slave using ReplTest.start(false) results in a slave running with FCV 3.4 until it completes syncing all databases with a master (see comments). Any test depending on the slave being at FCV 3.6 must wait for replication before running any 3.6 commands This affects jstests/noPassthrough/unsupported_change_stream_deployments.js |
| Comments |
| Comment by Githook User [ 09/Nov/17 ] |
|
Author: {'name': 'Matthew Russotto', 'username': 'mtrussotto', 'email': 'matthew.russotto@10gen.com'}Message: |
| Comment by Eric Milkie [ 09/Nov/17 ] |
|
I corrected the description in this ticket. Note that slaves do not have an atomic "initial sync" like replica sets do, so it is insufficient to just "wait for a write to be replicated". You will need to ensure that the admin database in particular is replicated, and slaves replicate databases in lexicographic order. Therefore, doing a write to a db named "a" won't work, but one named "b" will. Such is master/slave. |
| Comment by Judah Schvimer [ 08/Nov/17 ] |
|
Feel free to steal this one. |
| Comment by Matthew Russotto [ 08/Nov/17 ] |
|
SGTM. Should we make a new ticket for the test or just use this one? |
| Comment by Judah Schvimer [ 08/Nov/17 ] |
|
Slaves default to fCV 3.4 when they do not have an fCV document. As soon as they sync one that specifies fCV 3.6, they switch. This is correct behavior. The test should just wait until the slave syncs the fCV document before it tries to run a command on it. matthew.russotto, does this address your concern? |