Details
-
Bug
-
Resolution: Duplicate
-
Major - P3
-
None
-
None
-
None
-
Query
-
ALL
-
61
Description
During MapReduceCommand::errMsgRun.
- We create an ObjScopeGuardImpl0 via ON_BLOCK_EXIT_OBJ on line 1434 here.
- Upon destruction, this guard will run State::dropTempCollections.
- During execution of the block which we have scopeguarded, we step down from Primary:
[ShardedClusterFixture:job0:shard0:node0] 2018-05-31T14:55:41.662+0000 I COMMAND [conn362] Attempting to step down in response to replSetStepDown command
[ShardedClusterFixture:job0:shard0:node0] 2018-05-31T14:55:41.671+0000 I REPL [conn362] transition to SECONDARY from PRIMARY
- When we exit the block, the guard is destroyed and invokes SafeExecute, which in turn invokes State::dropTempCollections.
- Because we have stepped down to Secondary, this throws an ExceptionFor<ErrorCodes::NotMaster>.
- Since SafeExecute is not expecting any exceptions to be thrown, it bails out with an std::terminate here.
Attachments
Issue Links
- duplicates
-
SERVER-33245 mr.cpp can throw in an ON_BLOCK_EXIT handler when there's already an active exception
-
- Closed
-