diff options
author | George Wangensteen <george.wangensteen@mongodb.com> | 2022-05-11 18:42:14 +0000 |
---|---|---|
committer | Evergreen Agent <no-reply@evergreen.mongodb.com> | 2022-05-23 23:16:32 +0000 |
commit | c904c1853594468bbf60cc330d89a5b89b0e6365 (patch) | |
tree | e6cd5340879d1bb488cd6879d4ffa8a8ff223878 /src/mongo/db/operation_context.h | |
parent | 10945bc699a008934c360b922cdd9ac5e6332af8 (diff) | |
download | mongo-c904c1853594468bbf60cc330d89a5b89b0e6365.tar.gz |
SERVER-66353 Add concurrency information to OperationContext::setAlwaysInterruptAtStepDownOrUp
Diffstat (limited to 'src/mongo/db/operation_context.h')
-rw-r--r-- | src/mongo/db/operation_context.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/operation_context.h b/src/mongo/db/operation_context.h index e4b522139d4..9701a28801a 100644 --- a/src/mongo/db/operation_context.h +++ b/src/mongo/db/operation_context.h @@ -493,8 +493,14 @@ public: /** * Sets that this operation should always get killed during stepDown and stepUp, regardless of * whether or not it's taken a write lock. + * + * Note: This function is NOT synchronized with the ReplicationStateTransitionLock! This means + * that the node's view of it's replication state can change concurrently with this function + * running - in which case your operation may _not_ be interrupted by that concurrent + * replication state change. If you need to ensure that your node does not change + * replication-state while calling this function, take the RSTL. See SERVER-66353 for more info. */ - void setAlwaysInterruptAtStepDownOrUp() { + void setAlwaysInterruptAtStepDownOrUp_UNSAFE() { _alwaysInterruptAtStepDownOrUp.store(true); } |