diff options
author | Ian Boros <ian.boros@10gen.com> | 2018-05-01 19:09:17 -0400 |
---|---|---|
committer | Ian Boros <ian.boros@10gen.com> | 2018-05-15 15:49:32 -0400 |
commit | 3c9e353969fcc1ae77056161ff10846d735d45b8 (patch) | |
tree | 512a36ad9067a96e805f82504299da1ba1639c1b /src/mongo/db/curop_failpoint_helpers.h | |
parent | 59f462046d76a7d8e48ec678ad03b489f5fcc56e (diff) | |
download | mongo-3c9e353969fcc1ae77056161ff10846d735d45b8.tar.gz |
SERVER-34515 fix invariant failure caused by js interruption in group command
Diffstat (limited to 'src/mongo/db/curop_failpoint_helpers.h')
-rw-r--r-- | src/mongo/db/curop_failpoint_helpers.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/db/curop_failpoint_helpers.h b/src/mongo/db/curop_failpoint_helpers.h index 47e05a93eed..7c073ab02bf 100644 --- a/src/mongo/db/curop_failpoint_helpers.h +++ b/src/mongo/db/curop_failpoint_helpers.h @@ -35,6 +35,12 @@ namespace mongo { class CurOpFailpointHelpers { public: /** + * Helper function which sets the 'msg' field of the opCtx's CurOp to the specified string, and + * returns the original value of the field. + */ + static std::string updateCurOpMsg(OperationContext* opCtx, const std::string& newMsg); + + /** * This helper function works much like MONGO_FAIL_POINT_PAUSE_WHILE_SET, but additionally * calls whileWaiting() at regular intervals. Finally, it also sets the 'msg' field of the * opCtx's CurOp to the given string while the failpoint is active. |