summaryrefslogtreecommitdiff
path: root/src/mongo/db/repl_index_build_state.cpp
diff options
context:
space:
mode:
authorLouis Williams <louis.williams@mongodb.com>2023-02-10 14:35:56 +0000
committerEvergreen Agent <no-reply@evergreen.mongodb.com>2023-02-22 20:50:53 +0000
commitdab496ed148b2b5895780e6fd4208bddae2424c5 (patch)
tree3e72d2a1ac546e6be9a72880e1511a205c5565cb /src/mongo/db/repl_index_build_state.cpp
parent8bea11983310ab5be581d59bd84573a2089c8825 (diff)
downloadmongo-dab496ed148b2b5895780e6fd4208bddae2424c5.tar.gz
SERVER-73873 Remove opCtx captures from onCommit/onRollback handlers
Diffstat (limited to 'src/mongo/db/repl_index_build_state.cpp')
-rw-r--r--src/mongo/db/repl_index_build_state.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mongo/db/repl_index_build_state.cpp b/src/mongo/db/repl_index_build_state.cpp
index 2c0c02c40a5..f30074225df 100644
--- a/src/mongo/db/repl_index_build_state.cpp
+++ b/src/mongo/db/repl_index_build_state.cpp
@@ -154,10 +154,11 @@ void ReplIndexBuildState::start(OperationContext* opCtx) {
void ReplIndexBuildState::commit(OperationContext* opCtx) {
auto skipCheck = _shouldSkipIndexBuildStateTransitionCheck(opCtx);
- opCtx->recoveryUnit()->onCommit([this, skipCheck](boost::optional<Timestamp> commitTime) {
- stdx::unique_lock<Latch> lk(_mutex);
- _indexBuildState.setState(IndexBuildState::kCommitted, skipCheck);
- });
+ opCtx->recoveryUnit()->onCommit(
+ [this, skipCheck](OperationContext*, boost::optional<Timestamp>) {
+ stdx::unique_lock<Latch> lk(_mutex);
+ _indexBuildState.setState(IndexBuildState::kCommitted, skipCheck);
+ });
}
Timestamp ReplIndexBuildState::getCommitTimestamp() const {