[SERVER-33617] fix collMod to update by UUID during oplog application Created: 02/Mar/18 Updated: 27/Oct/23 Resolved: 16/May/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Xiangyu Yao (Inactive) |
| Resolution: | Works as Designed | Votes: | 0 |
| Labels: | initialSync | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||
| Operating System: | ALL | ||||||||||||
| Backport Requested: |
v3.6
|
||||||||||||
| Sprint: | Storage NYC 2018-05-21 | ||||||||||||
| Participants: | |||||||||||||
| Linked BF Score: | 65 | ||||||||||||
| Description |
|
These can happen due to initial sync idempotency requirements. Consider: |
| Comments |
| Comment by Xiangyu Yao (Inactive) [ 16/May/18 ] |
|
Closing this since our code worked as designed: we translate the UUID to the namespace before we call collMod, so collMod is actually always using the UUID provided. |
| Comment by Ian Whalen (Inactive) [ 06/Apr/18 ] |
|
See |
| Comment by Spencer Brody (Inactive) [ 27/Mar/18 ] |
|
Putting back into Needs Triage since this is a regression in 3.6 |
| Comment by Ian Whalen (Inactive) [ 09/Mar/18 ] |
|
From the Storage triage meeting, we believe this is a bug in collmod rather than an error that should be ignored. collMod should apply by UUID rather than by name in case of renamed collections during initial sync. Updating the title to reflect this. |
| Comment by Andy Schwerin [ 05/Mar/18 ] |
|
If they turn out to be meaningful, better give them a name in the errorcodes file. You could still use the same number, of course. |
| Comment by Geert Bosch [ 02/Mar/18 ] |
|
Yes, Node 2 does need to apply the collMod, but on collection B. That is, for oplog application the collection part of the namespace name should always be ignored and the operation should be performed based on the UUID. Looking at the code, we always do that for CRUD ops, and do it explicitly in the create and renameCollection commands. However, we seem to miss testing of other non-crud commands in combination with renames. I'd expect a test case for the scenario you describe inside jstests/replsets/apply_ops_idempotency.js would fail. |
| Comment by Judah Schvimer [ 02/Mar/18 ] |
|
geert.bosch, do you see any problems with this? |