0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 01:21:03 +01:00
mongodb/jstests/sharding/autosplit_include.js
Matthew Saltz da38575dde SERVER-34448 Enable autosplitting on the shard and disable on mongos
SERVER-34449 Handle upgrade/downgrade logic for autosplitting on shard

SERVER-34448 Wait for chunk splitting in top chunk optimization tests

SERVER-34448 Require persistence in shard_existing_coll_chunk_count.js
2018-08-09 14:30:15 -04:00

16 lines
656 B
JavaScript

load("jstests/libs/feature_compatibility_version.js");
/**
* Waits for all ongoing chunk splits, but only if FCV is latest
*/
function waitForOngoingChunkSplits(shardingTest) {
shardingTest.forEachConnection(function(conn) {
var res = conn.getDB("admin").runCommand({waitForOngoingChunkSplits: 1});
if (!res.hasOwnProperty("ok")) {
// This is expected in the sharding_last_stable suite, so we can't assert.commandWorked,
// but it's good to put a log message in case it fails at some point outside of this
// suite
print("Command waitForOngoingChunkSplits failed");
}
});
}