summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTommaso Tocci <tommaso.tocci@mongodb.com>2022-02-04 10:53:14 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-02-04 11:22:43 +0000
commit2549aaadb6665856b7f971fd62128db5b9cdb916 (patch)
tree96cd09cea159f0246358b19cbd7b236aa0debb42
parenta22f3c599e1e588cdb5916785f27af7cd5493d18 (diff)
downloadmongo-2549aaadb6665856b7f971fd62128db5b9cdb916.tar.gz
SERVER-63239 Test defragmenting collection with empty chunks
-rw-r--r--jstests/sharding/libs/defragmentation_util.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/sharding/libs/defragmentation_util.js b/jstests/sharding/libs/defragmentation_util.js
index aa861e61a7f..f67318781bb 100644
--- a/jstests/sharding/libs/defragmentation_util.js
+++ b/jstests/sharding/libs/defragmentation_util.js
@@ -57,7 +57,7 @@ var defragmentationUtil = (function() {
let chunkSize = Random.randInt(maxChunkFillMB);
let docsPerChunk = (chunkSize * 1024 * 1024) / docSizeBytes;
if (docsPerChunk === 0) {
- docsPerChunk = 1;
+ return;
}
let minKey = chunk["min"]["key"];
if (minKey === MinKey)