summaryrefslogtreecommitdiff
path: root/src/mongo/s/client/shard.h
diff options
context:
space:
mode:
authorSpencer T Brody <spencer@mongodb.com>2016-06-21 18:26:43 -0400
committerSpencer T Brody <spencer@mongodb.com>2016-06-28 13:33:15 -0400
commita0351d0713a20f50d9084f98b4df0de11cfabe23 (patch)
tree1fea9e3f382b1d9878a36b44d48a0e40258c3369 /src/mongo/s/client/shard.h
parent99933bb71bd26684f08ac07ff3844df878bee01a (diff)
downloadmongo-a0351d0713a20f50d9084f98b4df0de11cfabe23.tar.gz
SERVER-23096 Move initialization of config.version and the config db indexes to the config server
Diffstat (limited to 'src/mongo/s/client/shard.h')
-rw-r--r--src/mongo/s/client/shard.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mongo/s/client/shard.h b/src/mongo/s/client/shard.h
index d88d3fb67da..d2619f68b08 100644
--- a/src/mongo/s/client/shard.h
+++ b/src/mongo/s/client/shard.h
@@ -159,6 +159,17 @@ public:
const BSONObj& query,
const BSONObj& sort,
const boost::optional<long long> limit);
+ /**
+ * Builds an index on a config server collection.
+ * Creates the collection if it doesn't yet exist. Does not error if the index already exists,
+ * so long as the options are the same.
+ * NOTE: Currently only supported for LocalShard.
+ */
+ virtual Status createIndexOnConfig(OperationContext* txn,
+ const NamespaceString& ns,
+ const BSONObj& keys,
+ bool unique) = 0;
+
protected:
Shard(const ShardId& id);