summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/config/sharding_catalog_manager.h
diff options
context:
space:
mode:
authorAntonio Fuschetto <antonio.fuschetto@mongodb.com>2021-04-23 15:26:49 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2021-04-27 08:18:17 +0000
commitbd5d5c0a03a557c25282075b93bf606a4435aa4a (patch)
tree43a3bc3cf5ec22bbdecd2195aec7ab7ddd3bcd44 /src/mongo/db/s/config/sharding_catalog_manager.h
parent0c7ff5fc51ce3cdfd103798e38525a99590430b8 (diff)
downloadmongo-bd5d5c0a03a557c25282075b93bf606a4435aa4a.tar.gz
SERVER-55867 commitMovePrimary concurrent with setFCV may write incorrect metadata
Diffstat (limited to 'src/mongo/db/s/config/sharding_catalog_manager.h')
-rw-r--r--src/mongo/db/s/config/sharding_catalog_manager.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/mongo/db/s/config/sharding_catalog_manager.h b/src/mongo/db/s/config/sharding_catalog_manager.h
index 5a72d95d78a..e8a7da2b356 100644
--- a/src/mongo/db/s/config/sharding_catalog_manager.h
+++ b/src/mongo/db/s/config/sharding_catalog_manager.h
@@ -671,6 +671,16 @@ private:
* taking this.
*/
Lock::ResourceMutex _kZoneOpLock;
+
+ /**
+ * Lock for local database operations. This should be acquired when executing
+ * 'commitMovePrimary' and 'setFeatureCompatibilityVersion' commands which affect the
+ * config.databases collection. No other locks should be held when locking this. If an operation
+ * needs to take database locks (for example to write to a local collection) those locks should
+ * be taken after taking this.
+ * TODO (SERVER-53283): Remove once version 5.0 has been released.
+ */
+ Lock::ResourceMutex _kDatabaseOpLock;
};
} // namespace mongo