diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-03-14 17:33:49 -0400 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-03-19 22:42:29 -0400 |
commit | 3e53f0ce9cdff926473276a34a351972ea963a57 (patch) | |
tree | 73d8525cc4ed68faf3bb1c983510150841c4e872 /src/mongo/db/s/sharding_state.h | |
parent | 914bbbd26a686e032fdddec964b109ea78c6e6f6 (diff) | |
download | mongo-3e53f0ce9cdff926473276a34a351972ea963a57.tar.gz |
SERVER-27681 Use CatalogCache to load metadata on shards
This change gets rid of the MetadataLoader in place of using the
CatalogCache for loading chunk metadata on shards. This ensures that the
same concurrency control and rate limiting applies on mongos and mongod
and obviates the need for having different kinds of ChunkDiffer.
Diffstat (limited to 'src/mongo/db/s/sharding_state.h')
-rw-r--r-- | src/mongo/db/s/sharding_state.h | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/mongo/db/s/sharding_state.h b/src/mongo/db/s/sharding_state.h index 96b650ad803..e5a74e081a9 100644 --- a/src/mongo/db/s/sharding_state.h +++ b/src/mongo/db/s/sharding_state.h @@ -43,8 +43,6 @@ #include "mongo/stdx/memory.h" #include "mongo/stdx/mutex.h" #include "mongo/stdx/unordered_map.h" -#include "mongo/util/concurrency/ticketholder.h" -#include "mongo/util/time_support.h" namespace mongo { @@ -303,13 +301,8 @@ private: * Refreshes collection metadata by asking the config server for the latest information and * returns the latest version at the time the reload was done. This call does network I/O and * should never be called with a lock. - * - * The metadataForDiff argument indicates that the specified metadata should be used as a base - * from which to only load the differences. If nullptr is passed, a full reload will be done. */ - StatusWith<ChunkVersion> _refreshMetadata(OperationContext* opCtx, - const NamespaceString& nss, - const CollectionMetadata* metadataForDiff); + ChunkVersion _refreshMetadata(OperationContext* opCtx, const NamespaceString& nss); // Initializes a TaskExecutor for cleaning up orphaned ranges void _initializeRangeDeleterTaskExecutor(); @@ -335,9 +328,6 @@ private: // Sets the shard name for this host (comes through setShardVersion) std::string _shardName; - // Protects from hitting the config server from too many threads at once - TicketHolder _configServerTickets; - // Cache of collection metadata on this shard. It is not safe to look-up values from this map // without holding some form of collection lock. It is only safe to add/remove values when // holding X lock on the respective namespace. |