diff options
author | Spencer Jackson <spencer.jackson@mongodb.com> | 2019-02-21 11:13:35 -0500 |
---|---|---|
committer | Spencer Jackson <spencer.jackson@mongodb.com> | 2019-02-25 13:16:17 -0500 |
commit | 582ae15f89f2cac5e89d9b670f8f80efb6d90db0 (patch) | |
tree | c3ab7fcd2abd1fa560016cb0f3f3b2eb09ede3d6 /src/mongo/db/db_raii.cpp | |
parent | c856af8f3ad9c2ad204362101b4f007f3fe28b17 (diff) | |
download | mongo-582ae15f89f2cac5e89d9b670f8f80efb6d90db0.tar.gz |
SERVER-39542 Migrate server parameters to IDL in src/mongo/db/db_raii.cpp
Diffstat (limited to 'src/mongo/db/db_raii.cpp')
-rw-r--r-- | src/mongo/db/db_raii.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/mongo/db/db_raii.cpp b/src/mongo/db/db_raii.cpp index fa9bd68f338..1cba6635cf0 100644 --- a/src/mongo/db/db_raii.cpp +++ b/src/mongo/db/db_raii.cpp @@ -36,6 +36,7 @@ #include "mongo/db/catalog/database_holder.h" #include "mongo/db/concurrency/locker.h" #include "mongo/db/curop.h" +#include "mongo/db/db_raii_gen.h" #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/s/collection_sharding_state.h" #include "mongo/db/server_parameters.h" @@ -49,10 +50,6 @@ const boost::optional<int> kDoNotChangeProfilingLevel = boost::none; } // namespace -// If true, do not take the PBWM lock in AutoGetCollectionForRead on secondaries during batch -// application. -MONGO_EXPORT_SERVER_PARAMETER(allowSecondaryReadsDuringBatchApplication, bool, true); - AutoStatsTracker::AutoStatsTracker(OperationContext* opCtx, const NamespaceString& nss, Top::LockType lockType, @@ -93,7 +90,7 @@ AutoGetCollectionForRead::AutoGetCollectionForRead(OperationContext* opCtx, Date_t deadline) { // Don't take the ParallelBatchWriterMode lock when the server parameter is set and our // storage engine supports snapshot reads. - if (allowSecondaryReadsDuringBatchApplication.load() && + if (gAllowSecondaryReadsDuringBatchApplication.load() && opCtx->getServiceContext()->getStorageEngine()->supportsReadConcernSnapshot()) { _shouldNotConflictWithSecondaryBatchApplicationBlock.emplace(opCtx->lockState()); } |