diff options
author | Paolo Polato <paolo.polato@mongodb.com> | 2021-06-15 14:29:44 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2021-06-15 15:48:50 +0000 |
commit | 73695f4b643527b67d972df57b765306063b94c2 (patch) | |
tree | 09a6e46d400f3df1fd67a60858ca747601a5b902 | |
parent | faddcb44268d796c80306dfaffbd979f204f01ae (diff) | |
download | mongo-73695f4b643527b67d972df57b765306063b94c2.tar.gz |
Revert "SERVER-56307 Ensure that the estimated size of an object id is always bigger than zero."
This reverts commit 7d0aee4c7dec9380c3ef8be20c31b1334b27cd20.
-rw-r--r-- | src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp index 1d13f3728fd..6b65ecd7a50 100644 --- a/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp +++ b/src/mongo/db/s/migration_chunk_cloner_source_legacy.cpp @@ -898,8 +898,7 @@ Status MigrationChunkClonerSourceLegacy::_storeCurrentLocs(OperationContext* opC const uint64_t collectionAverageObjectSize = collection->averageObjectSize(opCtx); - uint64_t averageObjectIdSize = 0; - const uint64_t defaultObjectIdSize = OID::kOIDSize; + uint64_t averageObjectIdSize = OID::kOIDSize; if (totalRecs > 0) { const auto idIdx = collection->getIndexCatalog()->findIdIndex(opCtx)->getEntry(); if (!idIdx) { @@ -922,8 +921,8 @@ Status MigrationChunkClonerSourceLegacy::_storeCurrentLocs(OperationContext* opC } stdx::lock_guard<Latch> lk(_mutex); - _averageObjectSizeForCloneLocs = collectionAverageObjectSize + defaultObjectIdSize; - _averageObjectIdSize = std::max(averageObjectIdSize, defaultObjectIdSize); + _averageObjectSizeForCloneLocs = collectionAverageObjectSize + 12; + _averageObjectIdSize = averageObjectIdSize; return Status::OK(); } |