diff options
author | Allison Easton <allison.easton@mongodb.com> | 2022-12-07 12:42:49 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-12-07 21:37:36 +0000 |
commit | 84cb06c4dba20c297793de801dd1010271c7782e (patch) | |
tree | bd34e69fffc3fc107c98013dcba55285eebd44b7 | |
parent | 6b55bbebb1b199a9e0dcfdb4611a7a2cb58ba3a5 (diff) | |
download | mongo-84cb06c4dba20c297793de801dd1010271c7782e.tar.gz |
SERVER-71756 Defragmentation policy should issue dataSize commands with estimate true
(cherry picked from commit 49c71b36991b5eb765f66e03d09af6673c9aead7)
-rw-r--r-- | src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp b/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp index a397731d6b2..2dede7f8863 100644 --- a/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp @@ -220,8 +220,14 @@ public: if (pendingActions.rangesWithoutDataSize.size() > pendingActions.rangesToMerge.size()) { const auto& rangeToMeasure = pendingActions.rangesWithoutDataSize.back(); - nextAction = boost::optional<DefragmentationAction>(DataSizeInfo( - shardId, _nss, _uuid, rangeToMeasure, shardVersion, _shardKey, false)); + nextAction = + boost::optional<DefragmentationAction>(DataSizeInfo(shardId, + _nss, + _uuid, + rangeToMeasure, + shardVersion, + _shardKey, + true /* estimate */)); pendingActions.rangesWithoutDataSize.pop_back(); } else if (!pendingActions.rangesToMerge.empty()) { const auto& rangeToMerge = pendingActions.rangesToMerge.back(); |