[SERVER-31988] RollbackViaRefetch makes CollectionImpl validator out of sync with CollectionCatalogEntry Created: 15/Nov/17  Updated: 30/Oct/23  Resolved: 21/Nov/17

Status: Closed
Project: Core Server
Component/s: Replication
Affects Version/s: None
Fix Version/s: 3.6.0-rc5, 3.7.1

Type: Bug Priority: Major - P3
Reporter: Judah Schvimer Assignee: Judah Schvimer
Resolution: Fixed Votes: 0
Labels: rbfz
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: File rollback_collmods.js    
Issue Links:
Backports
Depends
Related
is related to SERVER-31146 Rollback via refetch should only set ... Closed
is related to SERVER-31805 rollbackViaRefetchNoUUID fails if rol... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.6
Sprint: Repl 2017-12-04
Participants:

 Description   

To check the validator, or to update the validator via a collMod command, mongod uses the validator cached in CollectionImpl. Since rollback doesn't update that validator, they get out of sync.



 Comments   
Comment by Githook User [ 21/Nov/17 ]

Author:

{'name': 'Judah Schvimer', 'username': 'judahschvimer', 'email': 'judah@mongodb.com'}

Message: SERVER-31988 RollbackViaRefetch makes CollectionImpl validator out of sync with CollectionCatalogEntry

(cherry picked from commit 4053104a4a0336304c8eab82d985941cd5e5e617)
Branch: v3.6
https://github.com/mongodb/mongo/commit/01be30b1e364f10f3b0ba7e7b00fd81337bae434

Comment by Githook User [ 21/Nov/17 ]

Author:

{'name': 'Judah Schvimer', 'username': 'judahschvimer', 'email': 'judah@mongodb.com'}

Message: SERVER-31988 RollbackViaRefetch makes CollectionImpl validator out of sync with CollectionCatalogEntry
Branch: master
https://github.com/mongodb/mongo/commit/4053104a4a0336304c8eab82d985941cd5e5e617

Comment by Judah Schvimer [ 15/Nov/17 ]

I think we need to use the CollectionImpl helper functions for setting the validation, and simply pass in the "off" value for each if not specified. This is because the default for validators is not the "off" value.

Comment by Judah Schvimer [ 15/Nov/17 ]

I've attached a repro script.

Comment by Judah Schvimer [ 15/Nov/17 ]

This affects both the "with UUID" and "without UUID" variants of rollback.

Generated at Thu Feb 08 04:28:49 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.