[SERVER-57205] Always write all three validator variables in the validator setter functions Created: 26/May/21  Updated: 29/Oct/23  Resolved: 26/May/21

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 5.0.0-rc1, 5.1.0-rc0

Type: Bug Priority: Major - P3
Reporter: Henrik Edin Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: post-rc0
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Depends
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v5.0
Sprint: Execution Team 2021-05-31
Participants:
Linked BF Score: 168

 Description   

When calling setValidator, setValidationLevel or setValidationAction we should write all three variables in the metadata.

This was how it worked prior to SERVER-56002. When we do a different write there may be a difference on disk depending on if the defaults are written or not.

This difference is can be observed in a multiversion environment (with or without SERVER-56002) when doing repl rollback.



 Comments   
Comment by Vivian Ge (Inactive) [ 06/Oct/21 ]

Updating the fixversion since branching activities occurred yesterday. This ticket will be in rc0 when it’s been triggered. For more active release information, please keep an eye on #server-release. Thank you!

Comment by Githook User [ 27/May/21 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-57205 Always write all three validator variables in the validator setter functions

This fixes a multiversion bug where a data inconsistency is detected because the defaults are not always written depending on version.

(cherry picked from commit f1090ddbcc24bf61bdadc937c8bdd483878b49cf)
Branch: v5.0
https://github.com/mongodb/mongo/commit/1e28e2561f359c30933e0a6fe7abac240fe28fe3

Comment by Githook User [ 26/May/21 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: SERVER-57205 Always write all three validator variables in the validator setter functions

This fixes a multiversion bug where a data inconsistency is detected because the defaults are not always written depending on version.
Branch: master
https://github.com/mongodb/mongo/commit/f1090ddbcc24bf61bdadc937c8bdd483878b49cf

Generated at Thu Feb 08 05:41:15 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.