Files
mongo/jstests/sharding/cleanup_orphaned_compound.js
2015-11-30 19:44:23 -05:00

19 lines
441 B
JavaScript

//
// Shards data from the key range, then inserts orphan documents, runs cleanupOrphans
// and makes sure that orphans are removed. Uses a compound shard key.
//
load('./jstests/libs/cleanup_orphaned_util.js');
testCleanupOrphaned({
shardKey: {a: 1, b: 1},
keyGen: function() {
var ids = [];
for (var i = -50; i < 50; i++) {
ids.push({a: i, b: Math.random()});
}
return ids;
}
});