diff options
author | Benety Goh <benety@mongodb.com> | 2016-07-29 11:52:52 -0400 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2016-07-29 15:14:19 -0400 |
commit | d305e618162d37ccc16cf574fcc0388a1160af93 (patch) | |
tree | ea153aa0e27b92bae0094f301b833e7965c3b7cb /src | |
parent | dfea15b458f68ee3cf2182701ab15cbfef9764b0 (diff) | |
download | mongo-d305e618162d37ccc16cf574fcc0388a1160af93.tar.gz |
SERVER-25084 removed unused StorageInterfaceImpl::_bulkLoaderThreads
Diffstat (limited to 'src')
-rw-r--r-- | src/mongo/db/repl/storage_interface_impl.cpp | 30 | ||||
-rw-r--r-- | src/mongo/db/repl/storage_interface_impl.h | 5 |
2 files changed, 7 insertions, 28 deletions
diff --git a/src/mongo/db/repl/storage_interface_impl.cpp b/src/mongo/db/repl/storage_interface_impl.cpp index f2fe3bcf5e2..dd75462f6f2 100644 --- a/src/mongo/db/repl/storage_interface_impl.cpp +++ b/src/mongo/db/repl/storage_interface_impl.cpp @@ -61,13 +61,14 @@ #include "mongo/db/repl/replication_coordinator.h" #include "mongo/db/repl/replication_coordinator_global.h" #include "mongo/db/repl/rs_initialsync.h" -#include "mongo/db/server_parameters.h" +#include "mongo/db/repl/task_runner.h" #include "mongo/db/service_context.h" #include "mongo/util/assert_util.h" #include "mongo/util/concurrency/old_thread_pool.h" #include "mongo/util/destructor_guard.h" #include "mongo/util/log.h" #include "mongo/util/mongoutils/str.h" + namespace mongo { namespace repl { @@ -78,8 +79,6 @@ const char StorageInterfaceImpl::kBeginFieldName[] = "begin"; namespace { using UniqueLock = stdx::unique_lock<stdx::mutex>; -MONGO_EXPORT_STARTUP_SERVER_PARAMETER(dataReplicatorInitialSyncInserterThreads, int, 4); - const BSONObj kInitialSyncFlag(BSON(StorageInterfaceImpl::kInitialSyncFlagFieldName << true)); } // namespace @@ -93,17 +92,9 @@ StorageInterfaceImpl::~StorageInterfaceImpl() { DESTRUCTOR_GUARD(shutdown();); } -void StorageInterfaceImpl::startup() { - _bulkLoaderThreads.reset( - new OldThreadPool{dataReplicatorInitialSyncInserterThreads, "InitialSyncInserters-"}); -}; +void StorageInterfaceImpl::startup(){}; -void StorageInterfaceImpl::shutdown() { - if (_bulkLoaderThreads) { - _bulkLoaderThreads->join(); - _bulkLoaderThreads.reset(); - } -} +void StorageInterfaceImpl::shutdown() {} NamespaceString StorageInterfaceImpl::getMinValidNss() const { return _minValidNss; @@ -523,16 +514,9 @@ StatusWith<BSONObj> StorageInterfaceImpl::deleteOne(OperationContext* txn, Status StorageInterfaceImpl::isAdminDbValid(OperationContext* txn) { log() << "StorageInterfaceImpl::isAdminDbValid called."; - // TODO: plumb through operation context from caller, for now run on ioThread with runner. - TaskRunner runner(_bulkLoaderThreads.get()); - auto status = runner.runSynchronousTask( - [](OperationContext* txn) -> Status { - ScopedTransaction transaction(txn, MODE_IX); - AutoGetDb autoDB(txn, "admin", MODE_X); - return checkAdminDatabase(txn, autoDB.getDb()); - }, - TaskRunner::NextAction::kDisposeOperationContext); - return status; + ScopedTransaction transaction(txn, MODE_IX); + AutoGetDb autoDB(txn, "admin", MODE_X); + return checkAdminDatabase(txn, autoDB.getDb()); } } // namespace repl diff --git a/src/mongo/db/repl/storage_interface_impl.h b/src/mongo/db/repl/storage_interface_impl.h index 7e45c77fae2..0226c4705aa 100644 --- a/src/mongo/db/repl/storage_interface_impl.h +++ b/src/mongo/db/repl/storage_interface_impl.h @@ -35,11 +35,8 @@ #include "mongo/base/string_data.h" #include "mongo/bson/bsonobj.h" #include "mongo/db/catalog/index_create.h" -#include "mongo/db/db_raii.h" #include "mongo/db/namespace_string.h" #include "mongo/db/repl/storage_interface.h" -#include "mongo/db/repl/task_runner.h" -#include "mongo/util/concurrency/old_thread_pool.h" namespace mongo { namespace repl { @@ -118,8 +115,6 @@ public: Status isAdminDbValid(OperationContext* txn) override; private: - // One thread per collection/TaskRunner - std::unique_ptr<OldThreadPool> _bulkLoaderThreads; const NamespaceString _minValidNss; }; |