[SERVER-55867] commitMovePrimary concurrent with setFCV may write incorrect metadata Created: 07/Apr/21  Updated: 29/Oct/23  Resolved: 27/Apr/21

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

Type: Bug Priority: Major - P3
Reporter: Jordi Serra Torrens Assignee: Antonio Fuschetto
Resolution: Fixed Votes: 0
Labels: PM-1965-Milestone-0-Metadata-Format
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Fully Compatible
Operating System: ALL
Sprint: Sharding EMEA 2021-05-03
Participants:

 Description   

When upgrading fcv to 5.0, the configsvr will patch-up the sharding metadata. In particular, it will set a 'timestamp' on the config.databases documents.

If this patch up happens concurrently with a commitMovePrimary, it could happen that commitMovePrimary reads the current config.databases entry (without timestamp), then the setFCV thread patches up the entry so it has a timestamp, and finally, the commitMovePrimary writes the updates database version without a timestamp.



 Comments   
Comment by Githook User [ 27/Apr/21 ]

Author:

{'name': 'Antonio Fuschetto', 'email': 'antonio.fuschetto@mongodb.com', 'username': 'afuschetto'}

Message: SERVER-55867 commitMovePrimary concurrent with setFCV may write incorrect metadata
Branch: master
https://github.com/mongodb/mongo/commit/bd5d5c0a03a557c25282075b93bf606a4435aa4a

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