summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/balancer/cluster_statistics_impl.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/balancer/cluster_statistics_impl.cpp')
-rw-r--r--src/mongo/db/s/balancer/cluster_statistics_impl.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/s/balancer/cluster_statistics_impl.cpp b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp
index 83b022294b4..7897ebc61bc 100644
--- a/src/mongo/db/s/balancer/cluster_statistics_impl.cpp
+++ b/src/mongo/db/s/balancer/cluster_statistics_impl.cpp
@@ -132,11 +132,9 @@ StatusWith<std::vector<ShardStatistics>> ClusterStatisticsImpl::_getStats(
if (ns) {
return shardutil::retrieveCollectionShardSize(opCtx, shard.getName(), *ns);
}
- // optimization for the case where the balancer does not care about the dataSize
- if (!shard.getMaxSizeMB()) {
- return 0;
- }
+
return shardutil::retrieveTotalShardSize(opCtx, shard.getName());
+ // return 0;
}();
if (!shardSizeStatus.isOK()) {
@@ -169,7 +167,6 @@ StatusWith<std::vector<ShardStatistics>> ClusterStatisticsImpl::_getStats(
}
stats.emplace_back(shard.getName(),
- shard.getMaxSizeMB() * 1024 * 1024,
shardSizeStatus.getValue(),
shard.getDraining(),
std::move(shardZones),