summaryrefslogtreecommitdiff
path: root/jstests/sharding/autosplit_include.js
blob: 84dc5d16a1959af16cf9cdab121dccf0e7372961 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
/**
 * 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_lts 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");
        }
    });
}