summaryrefslogtreecommitdiff
path: root/jstests/sharding/move_chunk_allowMigrations.js
diff options
context:
space:
mode:
authorPierlauro Sciarelli <pierlauro.sciarelli@mongodb.com>2022-05-24 15:12:45 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2022-10-14 13:34:32 +0000
commit81d40559953a2e91796605b926468bd0a0a53291 (patch)
tree6c4d4cd3e416a8b17d560221ea3ab9ee146fe383 /jstests/sharding/move_chunk_allowMigrations.js
parent7b450643b3bdfb402de5fceb26b076e8a72dc17f (diff)
downloadmongo-81d40559953a2e91796605b926468bd0a0a53291.tar.gz
SERVER-66378 Adapt tests skipped due to featureFlagBalanceAccordingToDataSize
Diffstat (limited to 'jstests/sharding/move_chunk_allowMigrations.js')
-rw-r--r--jstests/sharding/move_chunk_allowMigrations.js19
1 files changed, 7 insertions, 12 deletions
diff --git a/jstests/sharding/move_chunk_allowMigrations.js b/jstests/sharding/move_chunk_allowMigrations.js
index 93eb2b937e2..f6f89263954 100644
--- a/jstests/sharding/move_chunk_allowMigrations.js
+++ b/jstests/sharding/move_chunk_allowMigrations.js
@@ -17,15 +17,8 @@ load('jstests/libs/parallel_shell_helpers.js');
load("jstests/sharding/libs/find_chunks_util.js");
load("jstests/sharding/libs/shard_versioning_util.js");
-const st = new ShardingTest({shards: 2});
+const st = new ShardingTest({shards: 2, other: {chunkSize: 1, enableAutoSplit: false}});
const configDB = st.s.getDB("config");
-// TODO SERVER-66378 adapt this test for data size aware balancing
-if (FeatureFlagUtil.isEnabled(st.configRS.getPrimary().getDB('admin'),
- "BalanceAccordingToDataSize")) {
- jsTestLog("Skipping as featureFlagBalanceAccordingToDataSize is enabled");
- st.stop();
- return;
-}
// Resets database dbName and enables sharding and establishes shard0 as primary, test case agnostic
function setUpDatabaseAndEnableSharding(dbName) {
@@ -153,12 +146,14 @@ function testAllowMigrationsFalseDisablesBalancer(allowMigrations, collBSetNoBal
assert.commandWorked(st.s.adminCommand({shardCollection: collA.getFullName(), key: {_id: 1}}));
assert.commandWorked(st.s.adminCommand({shardCollection: collB.getFullName(), key: {_id: 1}}));
+ const bigString = 'X'.repeat(1024 * 1024); // 1MB
+
// Split both collections into 4 chunks so balancing can occur.
for (let coll of [collA, collB]) {
- coll.insert({_id: 1});
- coll.insert({_id: 10});
- coll.insert({_id: 20});
- coll.insert({_id: 30});
+ coll.insert({_id: 1, s: bigString});
+ coll.insert({_id: 10, s: bigString});
+ coll.insert({_id: 20, s: bigString});
+ coll.insert({_id: 30, s: bigString});
assert.commandWorked(st.splitAt(coll.getFullName(), {_id: 10}));
assert.commandWorked(st.splitAt(coll.getFullName(), {_id: 20}));