diff options
author | Sergi Mateo Bellido <sergi.mateo-bellido@mongodb.com> | 2021-01-20 13:31:30 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-21 13:56:22 +0000 |
commit | efa6daec5a21e0ff396723a2f66ca5c1820d1fb5 (patch) | |
tree | f81e5c058e3845c873954922cddcee454b51619d /src/mongo/db/s/config/sharding_catalog_manager.h | |
parent | 73252c4c0f184f1c81ffb478f66b6028ad7c72b9 (diff) | |
download | mongo-efa6daec5a21e0ff396723a2f66ca5c1820d1fb5.tar.gz |
SERVER-53867 Add/Remove timestamp to docs on config.chunks when upgrading/downgrading
Diffstat (limited to 'src/mongo/db/s/config/sharding_catalog_manager.h')
-rw-r--r-- | src/mongo/db/s/config/sharding_catalog_manager.h | 38 |
1 files changed, 20 insertions, 18 deletions
diff --git a/src/mongo/db/s/config/sharding_catalog_manager.h b/src/mongo/db/s/config/sharding_catalog_manager.h index e9f0a69269a..85e6b6f9158 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.h +++ b/src/mongo/db/s/config/sharding_catalog_manager.h @@ -618,44 +618,46 @@ private: void _downgradeCollectionsAndChunksMetadataToPre49(OperationContext* opCtx); /** - * Creates a 'timestamp' field for the entry matching nss in config.collections, in a + * Sets the 'timestamp' field for the entry matching nss in config.collections, in a * transaction. * * TODO SERVER-53283: Remove once 5.0 has been released. */ - void _createCollectionTimestampFor49InTxn(OperationContext* opCtx, - const NamespaceString& nss, - TxnNumber txnNumber); + void _addTimestampToConfigCollectionsFor49InTxn(OperationContext* opCtx, + const NamespaceString& nss, + TxnNumber txnNumber, + const Timestamp& newTimestamp); /** * Deletes the 'timestamp' from the entry in config.collections matching nss, in a transaction. * * TODO SERVER-53283: Remove once 5.0 has been released. */ - void _deleteConfigCollectionsTimestampInTxn(OperationContext* opCtx, - const NamespaceString& nss, - TxnNumber txnNumber); + void _deleteTimestampFromConfigCollectionsInTxn(OperationContext* opCtx, + const NamespaceString& nss, + TxnNumber txnNumber); /** - * Sets the 'collectionUuid' field for the entries matching nss in config.chunks, in a - * transaction. + * Sets the 'timestamp' and the 'collectionUuid' fields for the entries matching nss in + * config.chunks, in a transaction. * * TODO SERVER-53283: Remove once 5.0 has been released. */ - void _createChunkCollUuidFor49InTxn(OperationContext* opCtx, - const NamespaceString& nss, - const mongo::UUID& collectionUuid, - TxnNumber txnNumber); + void _addTimestampAndUUIDToConfigChunksFor49InTxn(OperationContext* opCtx, + const NamespaceString& nss, + const mongo::UUID& collectionUuid, + TxnNumber txnNumber, + const Timestamp& newTimestamp); /** - * Deletes the 'collectionUuid' field for the entries matching nss in config.chunks, in a - * transaction. + * Deletes the 'timestamp' and 'collectionUuid' field for the entries matching nss in + * config.chunks, in a transaction. * * TODO SERVER-53283: Remove once 5.0 has been released. */ - void _deleteChunkCollUuidInTxn(OperationContext* opCtx, - const NamespaceString& nss, - TxnNumber txnNumber); + void _deleteTimestampAndUUIDFromConfigChunksInTxn(OperationContext* opCtx, + const NamespaceString& nss, + TxnNumber txnNumber); // The owning service context ServiceContext* const _serviceContext; |