summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/database_sharding_state.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/mongo/db/s/database_sharding_state.h')
-rw-r--r--src/mongo/db/s/database_sharding_state.h49
1 files changed, 0 insertions, 49 deletions
diff --git a/src/mongo/db/s/database_sharding_state.h b/src/mongo/db/s/database_sharding_state.h
index 0431e801df8..4a263405c2b 100644
--- a/src/mongo/db/s/database_sharding_state.h
+++ b/src/mongo/db/s/database_sharding_state.h
@@ -74,13 +74,6 @@ public:
StringData dbName);
/**
- * Returns the name of the database related to the current sharding state.
- */
- std::string getDbName() const {
- return _dbName;
- }
-
- /**
* Checks if this shard is the primary shard for the given DB.
*
* Throws an IllegalOperation exception otherwise.
@@ -102,10 +95,6 @@ public:
return _critSec.getSignal(op);
}
- auto getCriticalSectionReason(DSSLock&) const {
- return _critSec.getReason() ? _critSec.getReason()->toString() : "Unknown";
- }
-
/**
* Returns this shard server's cached dbVersion, if one is cached.
*
@@ -160,43 +149,9 @@ public:
*/
void clearMovePrimarySourceManager(OperationContext* opCtx);
- /**
- * Sets the database metadata refresh future for other threads to wait on it.
- */
- void setDbMetadataRefreshFuture(SharedSemiFuture<void> future,
- CancellationSource cancellationSource,
- const DSSLock&);
-
- /**
- * If there is an ongoing database metadata refresh, returns the future to wait on it, otherwise
- * `boost::none`.
- */
- boost::optional<SharedSemiFuture<void>> getDbMetadataRefreshFuture(const DSSLock&) const;
-
- /**
- * Resets the database metadata refresh future to `boost::none`.
- */
- void resetDbMetadataRefreshFuture(const DSSLock&);
-
- /**
- * Cancel any ongoing database metadata refresh.
- */
- void cancelDbMetadataRefresh(const DSSLock&);
-
private:
friend DSSLock;
- struct DbMetadataRefresh {
- DbMetadataRefresh(SharedSemiFuture<void> future, CancellationSource cancellationSource)
- : future(std::move(future)), cancellationSource(std::move(cancellationSource)){};
-
- // Tracks the ongoing database metadata refresh.
- SharedSemiFuture<void> future;
-
- // Cancellation source to cancel the ongoing database metadata refresh.
- CancellationSource cancellationSource;
- };
-
// Object-wide ResourceMutex to protect changes to the DatabaseShardingState or objects held
// within.
Lock::ResourceMutex _stateChangeMutex{"DatabaseShardingState"};
@@ -218,10 +173,6 @@ private:
//
// NOTE: The source manager is not owned by this class.
MovePrimarySourceManager* _sourceMgr{nullptr};
-
- // Tracks the ongoing database metadata refresh. Possibly keeps a future for other threads to
- // wait on it, and a cancellation source to cancel the ongoing database metadata refresh.
- boost::optional<DbMetadataRefresh> _dbMetadataRefresh;
};
} // namespace mongo