diff options
Diffstat (limited to 'jstests/sharding/move_chunk_interrupt_postimage.js')
| -rw-r--r-- | jstests/sharding/move_chunk_interrupt_postimage.js | 42 |
1 files changed, 0 insertions, 42 deletions
diff --git a/jstests/sharding/move_chunk_interrupt_postimage.js b/jstests/sharding/move_chunk_interrupt_postimage.js deleted file mode 100644 index 69537bb9ce0..00000000000 --- a/jstests/sharding/move_chunk_interrupt_postimage.js +++ /dev/null @@ -1,42 +0,0 @@ -/** - * Tests that chunk migration interruption before processing post/pre image oplog entry leads - * to consistent config.transactions data across primary and secondaries (SERVER-67492) - */ - -(function() { -"use strict"; - -load("jstests/sharding/libs/create_sharded_collection_util.js"); -load("jstests/libs/fail_point_util.js"); -load('jstests/libs/parallel_shell_helpers.js'); - -const st = new ShardingTest({mongos: 1, config: 1, shards: 2, rs: {nodes: 2}}); -const interruptBeforeProcessingPrePostImageOriginatingOpFP = - configureFailPoint(st.rs1.getPrimary(), "interruptBeforeProcessingPrePostImageOriginatingOp"); - -const collection = st.s.getCollection("test.mycoll"); -CreateShardedCollectionUtil.shardCollectionWithChunks(collection, {x: 1}, [ - {min: {x: MinKey}, max: {x: 0}, shard: st.shard0.shardName}, - {min: {x: 0}, max: {x: 100}, shard: st.shard0.shardName}, - {min: {x: 100}, max: {x: MaxKey}, shard: st.shard1.shardName}, -]); - -assert.commandWorked(collection.insert({_id: 0, x: 10})); -assert.commandWorked(collection.runCommand("findAndModify", { - query: {x: 10}, - update: {$set: {y: 2}}, - new: true, - txnNumber: NumberLong(1), -})); - -const res = st.s.adminCommand({ - moveChunk: collection.getFullName(), - find: {x: 10}, - to: st.shard1.shardName, -}); -assert.commandFailedWithCode(res, ErrorCodes.CommandFailed); -interruptBeforeProcessingPrePostImageOriginatingOpFP.wait(); - -interruptBeforeProcessingPrePostImageOriginatingOpFP.off(); -st.stop(); -})(); |
