summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/s/query/async_results_merger.cpp8
-rw-r--r--src/mongo/s/query/async_results_merger.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/mongo/s/query/async_results_merger.cpp b/src/mongo/s/query/async_results_merger.cpp
index 63f6de4771d..34c117e6671 100644
--- a/src/mongo/s/query/async_results_merger.cpp
+++ b/src/mongo/s/query/async_results_merger.cpp
@@ -104,16 +104,16 @@ AsyncResultsMerger::AsyncResultsMerger(OperationContext* opCtx,
AsyncResultsMergerParams params)
: _opCtx(opCtx),
_executor(std::move(executor)),
+ _params(std::move(params)),
// This strange initialization is to work around the fact that the IDL does not currently
// support a default value for an enum. The default tailable mode should be 'kNormal', but
// since that is not supported we treat boost::none (unspecified) to mean 'kNormal'.
- _tailableMode(params.getTailableMode().value_or(TailableModeEnum::kNormal)),
- _params(std::move(params)),
+ _tailableMode(_params.getTailableMode().value_or(TailableModeEnum::kNormal)),
_mergeQueue(MergingComparator(
_remotes, _params.getSort().value_or(BSONObj()), _params.getCompareWholeSortKey())),
_promisedMinSortKeys(PromisedMinSortKeyComparator(_params.getSort().value_or(BSONObj()))) {
- if (params.getTxnNumber()) {
- invariant(params.getSessionId());
+ if (_params.getTxnNumber()) {
+ invariant(_params.getSessionId());
}
size_t remoteIndex = 0;
diff --git a/src/mongo/s/query/async_results_merger.h b/src/mongo/s/query/async_results_merger.h
index 3fde29e141e..9b5505ddc36 100644
--- a/src/mongo/s/query/async_results_merger.h
+++ b/src/mongo/s/query/async_results_merger.h
@@ -484,8 +484,8 @@ private:
OperationContext* _opCtx;
std::shared_ptr<executor::TaskExecutor> _executor;
- TailableModeEnum _tailableMode;
AsyncResultsMergerParams _params;
+ TailableModeEnum _tailableMode;
// Must be acquired before accessing any data members (other than _params, which is read-only).
mutable Mutex _mutex = MONGO_MAKE_LATCH("AsyncResultsMerger::_mutex");