summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/db/concurrency/d_concurrency_test.cpp10
-rw-r--r--src/mongo/db/concurrency/lock_manager.cpp19
-rw-r--r--src/mongo/db/concurrency/lock_manager.h16
-rw-r--r--src/mongo/db/concurrency/lock_state.cpp18
-rw-r--r--src/mongo/db/concurrency/locker.h9
-rw-r--r--src/mongo/db/storage/SConscript9
-rw-r--r--src/mongo/db/storage/storage_engine_parameters.cpp (renamed from src/mongo/db/storage/storage_parameters.cpp)2
-rw-r--r--src/mongo/db/storage/storage_engine_parameters.h (renamed from src/mongo/db/storage/storage_parameters.h)2
-rw-r--r--src/mongo/db/storage/storage_engine_parameters.idl76
-rw-r--r--src/mongo/db/storage/storage_parameters.idl43
-rw-r--r--src/mongo/db/storage/ticketholders.cpp24
-rw-r--r--src/mongo/db/storage/ticketholders.h6
-rw-r--r--src/mongo/db/storage/wiredtiger/SConscript2
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp44
-rw-r--r--src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp1
15 files changed, 171 insertions, 110 deletions
diff --git a/src/mongo/db/concurrency/d_concurrency_test.cpp b/src/mongo/db/concurrency/d_concurrency_test.cpp
index 9c1e131fdf6..9b359b9b6c4 100644
--- a/src/mongo/db/concurrency/d_concurrency_test.cpp
+++ b/src/mongo/db/concurrency/d_concurrency_test.cpp
@@ -70,18 +70,18 @@ const auto kMaxClockJitterMillis = Milliseconds(0);
class UseGlobalThrottling {
public:
explicit UseGlobalThrottling(OperationContext* opCtx, int numTickets) : _opCtx(opCtx) {
- _holder = std::make_unique<SemaphoreTicketHolder>(numTickets);
- _opCtx->lockState()->setGlobalThrottling(_holder.get(), _holder.get());
+ auto lockManager = LockManager::get(_opCtx);
+ lockManager->setTicketHolders(std::make_unique<SemaphoreTicketHolder>(numTickets),
+ std::make_unique<SemaphoreTicketHolder>(numTickets));
}
~UseGlobalThrottling() noexcept(false) {
// Reset the global setting as we're about to destroy the ticket holder.
- _opCtx->lockState()->setGlobalThrottling(nullptr, nullptr);
- ASSERT_EQ(_holder->used(), 0);
+ auto lockManager = LockManager::get(_opCtx);
+ lockManager->setTicketHolders(nullptr, nullptr);
}
private:
OperationContext* _opCtx;
- std::unique_ptr<TicketHolder> _holder;
};
diff --git a/src/mongo/db/concurrency/lock_manager.cpp b/src/mongo/db/concurrency/lock_manager.cpp
index 0737febeb25..5650d282ee6 100644
--- a/src/mongo/db/concurrency/lock_manager.cpp
+++ b/src/mongo/db/concurrency/lock_manager.cpp
@@ -47,6 +47,7 @@
#include "mongo/db/service_context.h"
#include "mongo/logv2/log.h"
#include "mongo/util/assert_util.h"
+#include "mongo/util/concurrency/ticketholder.h"
#include "mongo/util/decorable.h"
#include "mongo/util/str.h"
#include "mongo/util/timer.h"
@@ -878,6 +879,24 @@ void LockManager::getLockInfoBSON(const std::map<LockerId, BSONObj>& lockToClien
_buildLocksArray(lockToClientMap, false, this, &lockInfoArr);
}
+void LockManager::setTicketHolders(std::unique_ptr<TicketHolder> reading,
+ std::unique_ptr<TicketHolder> writing) {
+ _readingTicketholder = std::move(reading);
+ _writingTicketholder = std::move(writing);
+}
+
+TicketHolder* LockManager::getTicketHolder(LockMode mode) {
+ switch (mode) {
+ case MODE_IS:
+ case MODE_S:
+ return _readingTicketholder.get();
+ case MODE_IX:
+ return _writingTicketholder.get();
+ default:
+ return nullptr;
+ }
+}
+
void LockManager::_buildLocksArray(const std::map<LockerId, BSONObj>& lockToClientMap,
bool forLogging,
LockManager* mutableThis,
diff --git a/src/mongo/db/concurrency/lock_manager.h b/src/mongo/db/concurrency/lock_manager.h
index e54524489c1..594e42057b8 100644
--- a/src/mongo/db/concurrency/lock_manager.h
+++ b/src/mongo/db/concurrency/lock_manager.h
@@ -49,6 +49,7 @@ namespace mongo {
class OperationContext;
class ServiceContext;
+class TicketHolder;
/**
* Entry point for the lock manager scheduling functionality. Don't use it directly, but
@@ -167,6 +168,18 @@ public:
void getLockInfoBSON(const std::map<LockerId, BSONObj>& lockToClientMap,
BSONObjBuilder* result);
+ /**
+ * Sets the TicketHolder implementation to use to obtain tickets from 'reading' (for MODE_S and
+ * MODE_IS), and from 'writing' (for MODE_IX) in order to throttle database access. There is no
+ * throttling for MODE_X, as there can only ever be a single locker using this mode. The
+ * throttling is intended to defend against large drops in throughput under high load due to too
+ * much concurrency.
+ */
+ void setTicketHolders(std::unique_ptr<TicketHolder> readTickets,
+ std::unique_ptr<TicketHolder> writeTickets);
+
+ TicketHolder* getTicketHolder(LockMode mode);
+
private:
// The lockheads need access to the partitions
friend struct LockHead;
@@ -237,5 +250,8 @@ private:
static const unsigned _numPartitions;
Partition* _partitions;
+
+ std::unique_ptr<TicketHolder> _readingTicketholder;
+ std::unique_ptr<TicketHolder> _writingTicketholder;
};
} // namespace mongo
diff --git a/src/mongo/db/concurrency/lock_state.cpp b/src/mongo/db/concurrency/lock_state.cpp
index 14d51efd41a..d1f6059ea6c 100644
--- a/src/mongo/db/concurrency/lock_state.cpp
+++ b/src/mongo/db/concurrency/lock_state.cpp
@@ -286,22 +286,10 @@ void CondVarLockGrantNotification::notify(ResourceId resId, LockResult result) {
_cond.notify_all();
}
-namespace {
-TicketHolder* ticketHolders[LockModesCount] = {};
-} // namespace
-
-
//
// Locker
//
-/* static */
-void Locker::setGlobalThrottling(class TicketHolder* reading, class TicketHolder* writing) {
- ticketHolders[MODE_S] = reading;
- ticketHolders[MODE_IS] = reading;
- ticketHolders[MODE_IX] = writing;
-}
-
LockerImpl::LockerImpl()
: _id(idCounter.addAndFetch(1)), _wuowNestingLevel(0), _threadId(stdx::this_thread::get_id()) {}
@@ -371,7 +359,8 @@ void LockerImpl::reacquireTicket(OperationContext* opCtx) {
bool LockerImpl::_acquireTicket(OperationContext* opCtx, LockMode mode, Date_t deadline) {
const bool reader = isSharedLockMode(mode);
- auto holder = shouldAcquireTicket() ? ticketHolders[mode] : nullptr;
+ auto lockManager = getGlobalLockManager();
+ auto holder = shouldAcquireTicket() ? lockManager->getTicketHolder(mode) : nullptr;
if (holder) {
_clientState.store(reader ? kQueuedReader : kQueuedWriter);
@@ -1080,7 +1069,8 @@ void LockerImpl::releaseTicket() {
}
void LockerImpl::_releaseTicket() {
- auto holder = shouldAcquireTicket() ? ticketHolders[_modeForTicket] : nullptr;
+ auto ticketManager = getGlobalLockManager();
+ auto holder = shouldAcquireTicket() ? ticketManager->getTicketHolder(_modeForTicket) : nullptr;
if (holder) {
holder->release();
}
diff --git a/src/mongo/db/concurrency/locker.h b/src/mongo/db/concurrency/locker.h
index 37b6dbeedb8..bba99d01fdb 100644
--- a/src/mongo/db/concurrency/locker.h
+++ b/src/mongo/db/concurrency/locker.h
@@ -68,15 +68,6 @@ public:
}
/**
- * Require global lock attempts to obtain tickets from 'reading' (for MODE_S and MODE_IS),
- * and from 'writing' (for MODE_IX), which must have static lifetimes. There is no throttling
- * for MODE_X, as there can only ever be a single locker using this mode. The throttling is
- * intended to defend against large drops in throughput under high load due to too much
- * concurrency.
- */
- static void setGlobalThrottling(class TicketHolder* reading, class TicketHolder* writing);
-
- /**
* State for reporting the number of active and queued reader and writer clients.
*/
enum ClientState { kInactive, kActiveReader, kActiveWriter, kQueuedReader, kQueuedWriter };
diff --git a/src/mongo/db/storage/SConscript b/src/mongo/db/storage/SConscript
index ebfa82e9951..a78827b2446 100644
--- a/src/mongo/db/storage/SConscript
+++ b/src/mongo/db/storage/SConscript
@@ -175,7 +175,6 @@ env.Library(
target='storage_options',
source=[
'storage_options.cpp',
- 'storage_parameters.cpp',
'storage_parameters.idl',
],
LIBDEPS=[
@@ -184,17 +183,21 @@ env.Library(
],
LIBDEPS_PRIVATE=[
'$BUILD_DIR/mongo/idl/server_parameter',
- 'ticketholders'
],
)
env.Library(
- target='ticketholders',
+ target='storage_engine_parameters',
source=[
'ticketholders.cpp',
+ 'storage_engine_parameters.cpp',
+ 'storage_engine_parameters.idl',
],
LIBDEPS=[
'$BUILD_DIR/mongo/base',
+ '$BUILD_DIR/mongo/db/concurrency/lock_manager',
+ '$BUILD_DIR/mongo/db/service_context',
+ '$BUILD_DIR/mongo/idl/server_parameter',
],
)
diff --git a/src/mongo/db/storage/storage_parameters.cpp b/src/mongo/db/storage/storage_engine_parameters.cpp
index da14416936d..729bc99ecb1 100644
--- a/src/mongo/db/storage/storage_parameters.cpp
+++ b/src/mongo/db/storage/storage_engine_parameters.cpp
@@ -27,7 +27,7 @@
* it in the license file.
*/
-#include "mongo/db/storage/storage_parameters.h"
+#include "mongo/db/storage/storage_engine_parameters.h"
#include "mongo/db/storage/ticketholders.h"
#include "mongo/util/concurrency/ticketholder.h"
diff --git a/src/mongo/db/storage/storage_parameters.h b/src/mongo/db/storage/storage_engine_parameters.h
index d7395e51d2d..0083f7a79b3 100644
--- a/src/mongo/db/storage/storage_parameters.h
+++ b/src/mongo/db/storage/storage_engine_parameters.h
@@ -29,7 +29,7 @@
#pragma once
-#include "mongo/db/storage/storage_parameters_gen.h"
+#include "mongo/db/storage/storage_engine_parameters_gen.h"
namespace mongo {
diff --git a/src/mongo/db/storage/storage_engine_parameters.idl b/src/mongo/db/storage/storage_engine_parameters.idl
new file mode 100644
index 00000000000..03139a1e8bc
--- /dev/null
+++ b/src/mongo/db/storage/storage_engine_parameters.idl
@@ -0,0 +1,76 @@
+# Copyright (C) 2022-present MongoDB, Inc.
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the Server Side Public License, version 1,
+# as published by MongoDB, Inc.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# Server Side Public License for more details.
+#
+# You should have received a copy of the Server Side Public License
+# along with this program. If not, see
+# <http://www.mongodb.com/licensing/server-side-public-license>.
+#
+# As a special exception, the copyright holders give permission to link the
+# code of portions of this program with the OpenSSL library under certain
+# conditions as described in each individual source file and distribute
+# linked combinations including the program with the OpenSSL library. You
+# must comply with the Server Side Public License in all respects for
+# all of the code used other than as permitted herein. If you modify file(s)
+# with this exception, you may extend this exception to your version of the
+# file(s), but you are not obligated to do so. If you do not wish to do so,
+# delete this exception statement from your version. If you delete this
+# exception statement from all source files in the program, then also delete
+# it in the license file.
+#
+
+global:
+ cpp_namespace: "mongo"
+ cpp_includes:
+ - "mongo/db/storage/ticketholders.h"
+
+server_parameters:
+
+ # The wiredTigerQueueingPolicy specifies which policy to use and is essentially
+ # the same as the values of the enum QueueingPolicy
+ storageEngineQueueingPolicy:
+ description: "Storage Engine queueing policy to use"
+ set_at: [ startup ]
+ cpp_class:
+ name: TicketQueueingPolicy
+
+ storageEngineConcurrentWriteTransactions:
+ description: "Storage Engine Concurrent Write Transactions"
+ set_at: [ startup, runtime ]
+ cpp_vartype: AtomicWord<int>
+ cpp_varname: gConcurrentWriteTransactions
+ on_update: "TicketHolders::updateConcurrentWriteTransactions"
+ deprecated_name:
+ - wiredTigerConcurrentWriteTransactions
+ # Default value being 0 means we're allowing the underlying storage engines to use their default values.
+ default: 0
+ validator:
+ gt: 0
+
+ storageEngineConcurrentReadTransactions:
+ description: "Storage Engine Concurrent Read Transactions"
+ set_at: [ startup, runtime ]
+ cpp_vartype: AtomicWord<int>
+ cpp_varname: gConcurrentReadTransactions
+ on_update: "TicketHolders::updateConcurrentReadTransactions"
+ deprecated_name:
+ - wiredTigerConcurrentReadTransactions
+ # Default value being 0 means we're allowing the underlying storage engines to use their default values.
+ default: 0
+ validator:
+ gt: 0
+
+enums:
+ QueueingPolicy:
+ description: Queueing policy to use for obtaining tickets
+ type: string
+ values:
+ Semaphore: semaphore
+ FifoQueue: fifoQueue
diff --git a/src/mongo/db/storage/storage_parameters.idl b/src/mongo/db/storage/storage_parameters.idl
index a4ee499c6ff..1b00d318f36 100644
--- a/src/mongo/db/storage/storage_parameters.idl
+++ b/src/mongo/db/storage/storage_parameters.idl
@@ -30,7 +30,6 @@ global:
cpp_namespace: "mongo"
cpp_includes:
- "mongo/bson/bson_depth.h"
- - "mongo/db/storage/ticketholders.h"
server_parameters:
notablescan:
@@ -115,40 +114,6 @@ server_parameters:
cpp_vartype: bool
default: false
- # The wiredTigerQueueingPolicy specifies which policy to use and is essentially
- # the same as the values of the enum QueueingPolicy
- storageEngineQueueingPolicy:
- description: "Storage Engine queueing policy to use"
- set_at: [ startup ]
- cpp_class:
- name: TicketQueueingPolicy
-
- storageEngineConcurrentWriteTransactions:
- description: "Storage Engine Concurrent Write Transactions"
- set_at: [ startup, runtime ]
- cpp_vartype: AtomicWord<int>
- cpp_varname: gConcurrentWriteTransactions
- on_update: "TicketHolders::updateConcurrentWriteTransactions"
- deprecated_name:
- - wiredTigerConcurrentWriteTransactions
- # Default value being 0 means we're allowing the underlying storage engines to use their default values.
- default: 0
- validator:
- gt: 0
-
- storageEngineConcurrentReadTransactions:
- description: "Storage Engine Concurrent Read Transactions"
- set_at: [ startup, runtime ]
- cpp_vartype: AtomicWord<int>
- cpp_varname: gConcurrentReadTransactions
- on_update: "TicketHolders::updateConcurrentReadTransactions"
- deprecated_name:
- - wiredTigerConcurrentReadTransactions
- # Default value being 0 means we're allowing the underlying storage engines to use their default values.
- default: 0
- validator:
- gt: 0
-
feature_flags:
featureFlagClusteredIndexes:
description: "When enabled, support non time-series collections with clustered indexes"
@@ -196,11 +161,3 @@ feature_flags:
description: "When enabled, allow renaming databases during restore"
cpp_varname: feature_flags::gDatabaseRenameDuringRestore
default: false
-
-enums:
- QueueingPolicy:
- description: Queueing policy to use for obtaining tickets
- type: string
- values:
- Semaphore: semaphore
- FifoQueue: fifoQueue
diff --git a/src/mongo/db/storage/ticketholders.cpp b/src/mongo/db/storage/ticketholders.cpp
index 834453e1a34..4702774a96e 100644
--- a/src/mongo/db/storage/ticketholders.cpp
+++ b/src/mongo/db/storage/ticketholders.cpp
@@ -28,25 +28,31 @@
*/
#include "mongo/db/storage/ticketholders.h"
+#include "mongo/db/concurrency/lock_manager.h"
#include "mongo/util/concurrency/ticketholder.h"
namespace mongo {
-std::unique_ptr<TicketHolder> TicketHolders::openReadTransaction =
- std::unique_ptr<TicketHolder>(nullptr);
-std::unique_ptr<TicketHolder> TicketHolders::openWriteTransaction =
- std::unique_ptr<TicketHolder>(nullptr);
-
Status TicketHolders::updateConcurrentWriteTransactions(const int& newWriteTransactions) {
- if (openWriteTransaction) {
- return openWriteTransaction->resize(newWriteTransactions);
+ if (hasGlobalServiceContext()) {
+ auto serviceContext = getGlobalServiceContext();
+ auto lockManager = LockManager::get(serviceContext);
+ auto ticketHolder = lockManager->getTicketHolder(LockMode::MODE_IX);
+ if (ticketHolder) {
+ return ticketHolder->resize(newWriteTransactions);
+ }
}
return Status::OK();
};
Status TicketHolders::updateConcurrentReadTransactions(const int& newReadTransactions) {
- if (openReadTransaction) {
- return openReadTransaction->resize(newReadTransactions);
+ if (hasGlobalServiceContext()) {
+ auto serviceContext = getGlobalServiceContext();
+ auto lockManager = LockManager::get(serviceContext);
+ auto ticketHolder = lockManager->getTicketHolder(LockMode::MODE_IS);
+ if (ticketHolder) {
+ return ticketHolder->resize(newReadTransactions);
+ }
}
return Status::OK();
};
diff --git a/src/mongo/db/storage/ticketholders.h b/src/mongo/db/storage/ticketholders.h
index 241e31d0157..4fd4d877936 100644
--- a/src/mongo/db/storage/ticketholders.h
+++ b/src/mongo/db/storage/ticketholders.h
@@ -30,16 +30,12 @@
#pragma once
#include "mongo/base/status.h"
+
#include <memory>
namespace mongo {
-class TicketHolder;
-
struct TicketHolders {
- static std::unique_ptr<TicketHolder> openWriteTransaction;
- static std::unique_ptr<TicketHolder> openReadTransaction;
-
static Status updateConcurrentWriteTransactions(const int& newWriteTransactions);
static Status updateConcurrentReadTransactions(const int& newReadTransactions);
diff --git a/src/mongo/db/storage/wiredtiger/SConscript b/src/mongo/db/storage/wiredtiger/SConscript
index 74cbdc1a06f..9d9f5ca18f4 100644
--- a/src/mongo/db/storage/wiredtiger/SConscript
+++ b/src/mongo/db/storage/wiredtiger/SConscript
@@ -86,8 +86,8 @@ wtEnv.Library(
'$BUILD_DIR/mongo/db/multitenancy',
'$BUILD_DIR/mongo/db/snapshot_window_options',
'$BUILD_DIR/mongo/db/storage/backup_block',
+ '$BUILD_DIR/mongo/db/storage/storage_engine_parameters',
'$BUILD_DIR/mongo/db/storage/storage_repair_observer',
- '$BUILD_DIR/mongo/db/storage/ticketholders',
'$BUILD_DIR/mongo/util/log_and_backoff',
'$BUILD_DIR/mongo/util/options_parser/options_parser',
'oplog_stone_parameters',
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
index b1bdbd6b1ad..df06d81fb48 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_kv_engine.cpp
@@ -74,9 +74,10 @@
#include "mongo/db/snapshot_window_options_gen.h"
#include "mongo/db/storage/journal_listener.h"
#include "mongo/db/storage/key_format.h"
+#include "mongo/db/storage/storage_engine_parameters.h"
+#include "mongo/db/storage/storage_engine_parameters_gen.h"
#include "mongo/db/storage/storage_file_util.h"
#include "mongo/db/storage/storage_options.h"
-#include "mongo/db/storage/storage_parameters.h"
#include "mongo/db/storage/storage_parameters_gen.h"
#include "mongo/db/storage/storage_repair_observer.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_cursor.h"
@@ -576,26 +577,22 @@ WiredTigerKVEngine::WiredTigerKVEngine(const std::string& canonicalName,
auto writeTransactions = gConcurrentWriteTransactions.load();
writeTransactions = writeTransactions == 0 ? DEFAULT_TICKETS_VALUE : writeTransactions;
+ auto serviceContext = getGlobalServiceContext();
+ auto lockManager = LockManager::get(serviceContext);
switch (gTicketQueueingPolicy) {
case QueueingPolicyEnum::Semaphore:
LOGV2_DEBUG(6382201, 1, "Using Semaphore-based ticketing scheduler");
- TicketHolders::openReadTransaction =
- std::make_unique<SemaphoreTicketHolder>(readTransactions);
- TicketHolders::openWriteTransaction =
- std::make_unique<SemaphoreTicketHolder>(writeTransactions);
+ lockManager->setTicketHolders(
+ std::make_unique<SemaphoreTicketHolder>(readTransactions),
+ std::make_unique<SemaphoreTicketHolder>(writeTransactions));
break;
case QueueingPolicyEnum::FifoQueue:
LOGV2_DEBUG(6382200, 1, "Using FIFO queue-based ticketing scheduler");
- TicketHolders::openReadTransaction =
- std::make_unique<FifoTicketHolder>(readTransactions);
- TicketHolders::openWriteTransaction =
- std::make_unique<FifoTicketHolder>(writeTransactions);
+ lockManager->setTicketHolders(std::make_unique<FifoTicketHolder>(readTransactions),
+ std::make_unique<FifoTicketHolder>(writeTransactions));
break;
}
- Locker::setGlobalThrottling(TicketHolders::openReadTransaction.get(),
- TicketHolders::openWriteTransaction.get());
-
_runTimeConfigParam.reset(makeServerParameter<WiredTigerEngineRuntimeConfigParameter>(
"wiredTigerEngineRuntimeConfig", ServerParameterType::kRuntimeOnly));
_runTimeConfigParam->_data.second = this;
@@ -608,6 +605,13 @@ WiredTigerKVEngine::~WiredTigerKVEngine() {
cleanShutdown();
+ // Cleanup the ticket holders.
+ if (hasGlobalServiceContext()) {
+ auto serviceContext = getGlobalServiceContext();
+ auto lockManager = LockManager::get(serviceContext);
+ lockManager->setTicketHolders(nullptr, nullptr);
+ }
+
_sessionCache.reset(nullptr);
}
@@ -618,18 +622,22 @@ void WiredTigerKVEngine::notifyStartupComplete() {
void WiredTigerKVEngine::appendGlobalStats(BSONObjBuilder& b) {
BSONObjBuilder bb(b.subobjStart("concurrentTransactions"));
+ auto serviceContext = getGlobalServiceContext();
+ auto lockManager = LockManager::get(serviceContext);
+ auto writer = lockManager->getTicketHolder(MODE_IX);
+ auto reader = lockManager->getTicketHolder(MODE_IS);
{
BSONObjBuilder bbb(bb.subobjStart("write"));
- bbb.append("out", TicketHolders::openWriteTransaction->used());
- bbb.append("available", TicketHolders::openWriteTransaction->available());
- bbb.append("totalTickets", TicketHolders::openWriteTransaction->outof());
+ bbb.append("out", writer->used());
+ bbb.append("available", writer->available());
+ bbb.append("totalTickets", writer->outof());
bbb.done();
}
{
BSONObjBuilder bbb(bb.subobjStart("read"));
- bbb.append("out", TicketHolders::openReadTransaction->used());
- bbb.append("available", TicketHolders::openReadTransaction->available());
- bbb.append("totalTickets", TicketHolders::openReadTransaction->outof());
+ bbb.append("out", reader->used());
+ bbb.append("available", reader->available());
+ bbb.append("totalTickets", reader->outof());
bbb.done();
}
bb.done();
diff --git a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp
index 60aea459dc7..1e6f7816f65 100644
--- a/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp
+++ b/src/mongo/db/storage/wiredtiger/wiredtiger_parameters.cpp
@@ -30,7 +30,6 @@
#include "mongo/platform/basic.h"
-#include "mongo/db/storage/storage_parameters.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_global_options.h"
#include "mongo/db/storage/wiredtiger/wiredtiger_parameters_gen.h"
#include "mongo/logv2/log.h"