mirror of
https://github.com/mongodb/mongo.git
synced 2024-12-01 01:21:03 +01:00
da38575dde
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
16 lines
656 B
JavaScript
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");
|
|
}
|
|
});
|
|
}
|