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-12 12:57:55 +0000 |
commit | d94b9f177bb3e0463e9e8c4d75f4a51e417872ef (patch) | |
tree | c78c19b39af48a1d5caa62d4086bbe5625de7047 | |
parent | 98299022319738fa162ef7fe7bbbc5d1842a6e22 (diff) | |
download | mongo-d94b9f177bb3e0463e9e8c4d75f4a51e417872ef.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 63b2b8e4d22..df80d254e12 100644 --- a/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp +++ b/src/mongo/db/s/balancer/balancer_defragmentation_policy_impl.cpp @@ -217,8 +217,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(); |