[SERVER-30117] FeatureCompatibilityVersion::onInsertOrUpdate should only write to the server parameter on commit Created: 12/Jul/17  Updated: 30/Oct/23  Resolved: 26/Jul/17

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: 3.4.10, 3.5.11

Type: Bug Priority: Major - P3
Reporter: Maria van Keulen Assignee: Maria van Keulen
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Backports
Backwards Compatibility: Fully Compatible
Operating System: ALL
Backport Requested:
v3.4
Sprint: Storage 2017-07-31
Participants:

 Description   

Currently, onInsertOrUpdate does not wait for the write to the feature compatibility version document to be committed before writing to the feature compatibility version server parameter. This is an issue if, for example, we are setting feature compatibility version from 3.2 to 3.4 and just after the server parameter is updated but before the document is written, someone else attempts to insert a decimal value into a document, sees that the server parameter is 3.4, and gets the insert committed prior to the write to the feature compatibility version document being committed.



 Comments   
Comment by Ramon Fernandez Marina [ 12/Sep/17 ]

Author:

{'username': u'louiswilliams', 'name': u'Maria van Keulen', 'email': u'maria@mongodb.com'}

Message:SERVER-30117 FeatureCompatibilityVersion::onInsertOrUpdate should only write to the server parameter on commit

(cherry-picked from commit 2f81beb98df291431c36dcd5789828297b8c41a8)

Conflicts:
src/mongo/db/commands/feature_compatibility_version.cpp
src/mongo/db/commands/feature_compatibility_version.h
src/mongo/db/op_observer_impl.cpp
Branch:v3.4
https://github.com/mongodb/mongo/commit/5bf8f439833d8a1464f544a4aab390d79c98c377

Comment by Githook User [ 26/Jul/17 ]

Author:

{'email': 'maria@mongodb.com', 'username': 'mvankeulen94', 'name': 'Maria van Keulen'}

Message: SERVER-30117 Only update featureCompatibilityVersion parameter on commit
Branch: master
https://github.com/mongodb/mongo/commit/2f81beb98df291431c36dcd5789828297b8c41a8

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