[SERVER-35086] empty collMod oplog entry mimics upgrade Created: 18/May/18 Updated: 29/Oct/23 Resolved: 23/Jul/18 |
|
| Status: | Closed |
| Project: | Core Server |
| Component/s: | Replication, Storage, Upgrade/Downgrade |
| Affects Version/s: | None |
| Fix Version/s: | 3.6.6 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Judah Schvimer | Assignee: | Sean Tao |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | neweng | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||
| Backwards Compatibility: | Fully Compatible | ||||
| Operating System: | ALL | ||||
| Sprint: | Storage NYC 2018-06-18, Storage NYC 2018-07-02, Storage NYC 2018-07-16, Storage NYC 2018-07-30 | ||||
| Participants: | |||||
| Linked BF Score: | 65 | ||||
| Description |
|
In 3.6, an empty collMod is interpreted as an upgrade or downgrade command. However, just sending the server an empty collMod command creates an identical oplog entry. Initial sync is not safe with UUID upgrade/downgrade oplog entries, so it's not safe to log empty collMod oplog entries at all. |
| Comments |
| Comment by Githook User [ 23/Jul/18 ] |
|
Author: {'username': 'seantao97', 'name': 'seantao97', 'email': 'seantao97@gmail.com'}Message: |
| Comment by Sean Tao [ 06/Jun/18 ] |
|
Ok, I think I originally misunderstood the ticket. I thought that we were supposed to return an error for empty collMod commands because it was becoming deprecated or something like that. Thanks! |
| Comment by Judah Schvimer [ 05/Jun/18 ] |
|
sean.tao, I would expect an empty collMod to succeed but not log an oplog entry. I'd really expect any noop collMod to succeed but not log an oplog entry (but also wait for write concern if it attempts to do a write). geert.bosch, what do you think?
I'm not sure what you mean. Are you referring to UUID upgrade code? If so, that code definitely needs to stay in 3.6 and I believe 4.0 as well. |
| Comment by Sean Tao [ 05/Jun/18 ] |
|
Hi, I have a few questions about this ticket, which will be in the updated code review. First, and this is for Judah, what is the expected behavior for an empty coll_mod request? Right now I just return Status(ErrorCodes::InvalidOptions...), but I wanted to confirm this is what you wanted. Second, it appears as if some code later on deals with update for empty coll_mods. Should we delete this code for version 3.6? And finally, in the evergreen patch, we fail some tests, specifically collmod_without_uuid.js in jsCore on Linux DEBUG, because I believe the test sends an empty coll_mod request. Because this is only for v3.6, I was wondering what we should do about this test. Here is the relevant section of the log: : { [js_test:collmod_without_uuid] 2018-06-05T20:15:22.292+0000 } Sean
|