diff options
author | Louis Williams <louis.williams@mongodb.com> | 2020-04-10 10:02:34 -0400 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2020-04-10 14:16:22 +0000 |
commit | 3d929ed533a72446353b18b5d60770aed33b58f1 (patch) | |
tree | 09bd3562511aef88eb6aa1ef3b6c45b8d73c16e9 /jstests/noPassthrough/index_stepdown_failover.js | |
parent | 76d4548a751a56c8faf1887114685b540203a650 (diff) | |
download | mongo-3d929ed533a72446353b18b5d60770aed33b58f1.tar.gz |
SERVER-46560 Make abort index build deterministic
This redesigns user index build abort to have the following behavior:
- Take a collection X lock to stop the index build from making progress
- If we are no longer primary, return an error
- Check whether we can abort the index build (i.e. it is not already committing
or aborting)
- Delete the index catalog entry and write the abortIndexBuild oplog entry in a WUOW
- Interrupt the index builder thread
- Wait for the thread to exit
- Release locks
Diffstat (limited to 'jstests/noPassthrough/index_stepdown_failover.js')
-rw-r--r-- | jstests/noPassthrough/index_stepdown_failover.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/jstests/noPassthrough/index_stepdown_failover.js b/jstests/noPassthrough/index_stepdown_failover.js index 53a1093ce5d..28f0f8e2a2d 100644 --- a/jstests/noPassthrough/index_stepdown_failover.js +++ b/jstests/noPassthrough/index_stepdown_failover.js @@ -50,7 +50,7 @@ const newPrimaryColl = secondaryColl; assert.commandWorked(primary.adminCommand({replSetStepDown: 60, force: true})); const exitCode = createIdx({checkExitSuccess: false}); assert.neq(0, exitCode, 'expected shell to exit abnormally due to index build being terminated'); -checkLog.contains(primary, 'Index build interrupted: '); +checkLog.containsJson(primary, 20441); // Unblock the index build on the old primary during the collection scanning phase. // This index build will not complete because it has to wait for a commitIndexBuild oplog |