summaryrefslogtreecommitdiff
path: root/src/mongo/db/s/sharding_state.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-03-14 17:33:49 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2017-03-19 22:42:29 -0400
commit3e53f0ce9cdff926473276a34a351972ea963a57 (patch)
tree73d8525cc4ed68faf3bb1c983510150841c4e872 /src/mongo/db/s/sharding_state.h
parent914bbbd26a686e032fdddec964b109ea78c6e6f6 (diff)
downloadmongo-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.h12
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.