[SERVER-49748] Initial sync should clone admin.system.version before any other collections Created: 20/Jul/20 Updated: 29/Oct/23 Resolved: 18/Nov/21 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | None |
| Affects Version/s: | None |
| Fix Version/s: | 5.2.0, 5.1.2, 5.0.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Louis Williams | Assignee: | Jason Chan |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | former-quick-wins | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||
| Backwards Compatibility: | Fully Compatible | ||||||||||||||||||||||||
| Operating System: | ALL | ||||||||||||||||||||||||
| Backport Requested: |
v5.1, v5.0
|
||||||||||||||||||||||||
| Sprint: | Replication 2021-11-29 | ||||||||||||||||||||||||
| Participants: | |||||||||||||||||||||||||
| Linked BF Score: | 119 | ||||||||||||||||||||||||
| Description |
|
Collections cloned and indexes built before the admin.system.version collection will default to the lower FCV behavior because it will not have been initialized yet. See This has the potential to further introduce problems. Collection and index formats have the potential to be based on the FCV. We want to be able to assume our data is in a particular format if the FCV is set to a specific version, and at the moment that is not possible. To be safe and to avoid future bugs, we should clone this collection first. |
| Comments |
| Comment by Githook User [ 01/Dec/21 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}Message: (cherry picked from commit ba6d92a5b0ff986c40a105d067786bc33f702764) |
| Comment by Githook User [ 01/Dec/21 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}Message: (cherry picked from commit ba6d92a5b0ff986c40a105d067786bc33f702764) |
| Comment by Githook User [ 18/Nov/21 ] |
|
Author: {'name': 'Jason Chan', 'email': 'jason.chan@mongodb.com', 'username': 'jasonjhchan'}Message: |
| Comment by Huayu Ouyang [ 15/Nov/21 ] |
|
Marked as a bug because if a user creates a time-series collection on the admin database, and then a node goes through initial sync, the node might clone the time-series collection before the admin.system.version collection, and since creating a time-series collection checks the FCV, this results in an invariant failure (see BF-23342). This invariant can only occur on a node that is actively doing an initial sync. |
| Comment by Judah Schvimer [ 21/Aug/20 ] |
|
We should consider if we want to retrieve the FCV and install it in memory before starting collection cloning at all, in case it affects any steps before cloning admin.system.version. |
| Comment by Louis Williams [ 24/Jul/20 ] |
|
kevin.pulo, that's a good point. I talked to max.hirschhorn, and he is of the opinion that we don't want to do this. In the case of index/collection formats, we should rely on oplog entries and listCollections/listIndexes output. It's unfortunate the FCV happens to clone almost-first, so we rarely find bugs in this area. |
| Comment by Kevin Pulo [ 24/Jul/20 ] |
|
I hope admin.system.version never tries to rely on an FCV gated format! |