diff options
author | Sam Dunietz <sam.dunietz@10gen.com> | 2016-07-28 16:36:01 -0400 |
---|---|---|
committer | Sam Dunietz <sam.dunietz@10gen.com> | 2016-07-28 16:36:01 -0400 |
commit | 60cf7576bc66c1ca82d9ab25f0b8340c837d05ac (patch) | |
tree | 42880e90dd6d701c4f05851ee0c7bbce2e69a22f /src/mongo/db/s/sharding_state.h | |
parent | 11ceae3d75af61ec17a1612c11305a733927625b (diff) | |
download | mongo-60cf7576bc66c1ca82d9ab25f0b8340c837d05ac.tar.gz |
Revert "SERVER-24367 Implement CollectionRangeDeleter task lifetime management"
This reverts commit 9a776eae4f669fdcfae94c41c0cbbea662d36c94.
Diffstat (limited to 'src/mongo/db/s/sharding_state.h')
-rw-r--r-- | src/mongo/db/s/sharding_state.h | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/src/mongo/db/s/sharding_state.h b/src/mongo/db/s/sharding_state.h index a27b2841eda..e9605c6b717 100644 --- a/src/mongo/db/s/sharding_state.h +++ b/src/mongo/db/s/sharding_state.h @@ -36,9 +36,7 @@ #include "mongo/bson/oid.h" #include "mongo/db/namespace_string.h" #include "mongo/db/s/active_migrations_registry.h" -#include "mongo/db/s/collection_range_deleter.h" #include "mongo/db/s/migration_destination_manager.h" -#include "mongo/executor/task_executor.h" #include "mongo/executor/thread_pool_task_executor.h" #include "mongo/stdx/functional.h" #include "mongo/stdx/memory.h" @@ -75,10 +73,6 @@ public: using GlobalInitFunc = stdx::function<Status(OperationContext*, const ConnectionString&, StringData)>; - // Signature for the callback function used by the MetadataManager to inform the - // sharding subsystem that there is range cleanup work to be done. - using RangeDeleterCleanupNotificationFunc = stdx::function<void(const NamespaceString&)>; - ShardingState(); ~ShardingState(); @@ -161,7 +155,7 @@ public: */ void setShardName(const std::string& shardName); - CollectionShardingState* getNS(const std::string& ns, OperationContext* txn); + CollectionShardingState* getNS(const std::string& ns); /** * Clears the collection metadata cache after step down. @@ -249,23 +243,10 @@ public: void setGlobalInitMethodForTest(GlobalInitFunc func); /** - * Schedules for the range to clean of the given namespace to be deleted. - * Behavior can be modified through setScheduleCleanupFunctionForTest. - */ - void scheduleCleanup(const NamespaceString& nss); - - /** * Returns a pointer to the collection range deleter task executor. */ executor::ThreadPoolTaskExecutor* getRangeDeleterTaskExecutor(); - /** - * Sets the function used by scheduleWorkOnRangeDeleterTaskExecutor to - * schedule work. Used for mocking the executor for testing. See the ShardingState - * for the default implementation of _scheduleWorkFn. - */ - void setScheduleCleanupFunctionForTest(RangeDeleterCleanupNotificationFunc fn); - private: friend class ScopedRegisterMigration; @@ -382,10 +363,6 @@ private: // Function for initializing the external sharding state components not owned here. GlobalInitFunc _globalInit; - // Function for scheduling work on the _rangeDeleterTaskExecutor. - // Used in call to scheduleCleanup(NamespaceString). - RangeDeleterCleanupNotificationFunc _scheduleWorkFn; - // Task executor for the collection range deleter. std::unique_ptr<executor::ThreadPoolTaskExecutor> _rangeDeleterTaskExecutor; }; |