jstests/sharding/refine_collection_shard_key_basic.js
// Verifies the min and max fields are the same for the chunks and tags in the given collections.
Verifies the min and max fields are the same for the chunks and tags in the given collections.
Verifies the min and max fields are the same for the chunks and tags in the given collections .
function compareBoundaries(conn, shardedNs, refinedNs) {
    const shardedChunks =
        findChunksUtil.findChunksByNs(conn.getDB("config"), shardedNs).sort({max: 1}).toArray();
    const refinedChunks =
        findChunksUtil.findChunksByNs(conn.getDB("config"), refinedNs).sort({max: 1}).toArray();
    compareMinAndMaxFields(shardedChunks, refinedChunks);
    const shardedTags = conn.getDB("config").tags.find({ns: shardedNs}).sort({max: 1}).toArray();
    const refinedTags = conn.getDB("config").tags.find({ns: refinedNs}).sort({max: 1}).toArray();
    compareMinAndMaxFields(shardedTags, refinedTags);
}
function compareBoundaries ( conn , shardedNs , refinedNs ) { const shardedChunks = findChunksUtil . findChunksByNs ( conn . getDB ( "config" ) , shardedNs ) . sort ( { max : 1 } ) . toArray ( ) ; const refinedChunks = findChunksUtil . findChunksByNs ( conn . getDB ( "config" ) , refinedNs ) . sort ( { max : 1 } ) . toArray ( ) ; compareMinAndMaxFields ( shardedChunks , refinedChunks ) ; const shardedTags = conn . getDB ( "config" ) . tags . find ( { ns : shardedNs } ) . sort ( { max : 1 } ) . toArray ( ) ; const refinedTags = conn . getDB ( "config" ) . tags . find ( { ns : refinedNs } ) . sort ( { max : 1 } ) . toArray ( ) ; compareMinAndMaxFields ( shardedTags , refinedTags ) ; }
Verifies the min and max fields are the same for the chunks and tags in the given collections.
Verifies the min and max fields are the same for the chunks and tags in the given collections .
// Compare chunks. // Compare tags.