summaryrefslogtreecommitdiff
path: root/client/dbclient.h
diff options
context:
space:
mode:
authorAlberto Lerner <alerner@10gen.com>2010-09-30 08:38:40 -0400
committerAlberto Lerner <alerner@10gen.com>2010-09-30 08:38:40 -0400
commitda10c9799cd02b17032e5393be48d9f2b45cd1c3 (patch)
tree80861fb1466001b2cc4dda28a34ff3b80ca9bf96 /client/dbclient.h
parent3ba7ca34724b923c7aa0ce398227513ce7327efb (diff)
downloadmongo-da10c9799cd02b17032e5393be48d9f2b45cd1c3.tar.gz
SERVER-1691 don't cache calls to ensureIndex if sharding a collection
Diffstat (limited to 'client/dbclient.h')
-rw-r--r--client/dbclient.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/client/dbclient.h b/client/dbclient.h
index 615f3770436..d94426bc2cb 100644
--- a/client/dbclient.h
+++ b/client/dbclient.h
@@ -623,10 +623,12 @@ namespace mongo {
@param keys the "key pattern" for the index. e.g., { name : 1 }
@param unique if true, indicates that key uniqueness should be enforced for this index
@param name if not isn't specified, it will be created from the keys (recommended)
+ @param cache if set to false, the index cache for the connection won't remember this call
@return whether or not sent message to db.
should be true on first call, false on subsequent unless resetIndexCache was called
*/
- virtual bool ensureIndex( const string &ns , BSONObj keys , bool unique = false, const string &name = "" );
+ virtual bool ensureIndex( const string &ns , BSONObj keys , bool unique = false, const string &name = "",
+ bool cache = true );
/**
clears the index cache, so the subsequent call to ensureIndex for any index will go to the server