diff options
author | Jordi Serra Torrens <jordi.serra-torrens@mongodb.com> | 2021-01-21 11:08:07 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-01-22 10:25:46 +0000 |
commit | f3617ccb88b713884ae8e3853eefa42e84feda6d (patch) | |
tree | 48f7d199e4355d5a33858a9cd57ae060c5e96a20 /src/mongo/db/s/config | |
parent | f2edde9de318c91ad7e711cea6dcc13726fce4b0 (diff) | |
download | mongo-f3617ccb88b713884ae8e3853eefa42e84feda6d.tar.gz |
SERVER-53105: Amend tests that target config.chunks by ns to target by ns or uuid depending on collection timestamp
Diffstat (limited to 'src/mongo/db/s/config')
-rw-r--r-- | src/mongo/db/s/config/sharding_catalog_manager.cpp | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/src/mongo/db/s/config/sharding_catalog_manager.cpp b/src/mongo/db/s/config/sharding_catalog_manager.cpp index 5c94431b8f3..92877d3031f 100644 --- a/src/mongo/db/s/config/sharding_catalog_manager.cpp +++ b/src/mongo/db/s/config/sharding_catalog_manager.cpp @@ -746,14 +746,13 @@ void ShardingCatalogManager::_addTimestampAndUUIDToConfigChunksFor49InTxn( writeToConfigDocumentInTxn( opCtx, ChunkType::ConfigNS, - buildUpdateOp( - ChunkType::ConfigNS, - BSON(ChunkType::ns(nss.ns())), - BSON("$set" << BSON(ChunkType::timestamp(newTimestamp) - << ChunkType::collectionUUID(collectionUuid.toString()))), - false, /* upsert */ - true /* multi */ - ), + buildUpdateOp(ChunkType::ConfigNS, + BSON(ChunkType::ns(nss.ns())), + BSON("$set" << BSON(ChunkType::timestamp(newTimestamp) + << ChunkType::collectionUUID() << collectionUuid)), + false, /* upsert */ + true /* multi */ + ), txnNumber); } catch (DBException& e) { e.addContext(str::stream() << "Failed to update config.chunks to set collectionUUID for " @@ -771,7 +770,7 @@ void ShardingCatalogManager::_deleteTimestampAndUUIDFromConfigChunksInTxn( buildUpdateOp(ChunkType::ConfigNS, BSON(ChunkType::ns(nss.ns())), BSON("$unset" << BSON(ChunkType::timestamp.name() - << "" << ChunkType::collectionUUID(""))), + << "" << ChunkType::collectionUUID() << "")), false, /* upsert */ true /* multi */ ), |