diff options
author | Kevin Matulef <matulef@gmail.com> | 2012-06-08 03:31:57 -0400 |
---|---|---|
committer | Kevin Matulef <matulef@gmail.com> | 2012-06-08 03:31:57 -0400 |
commit | 048f738b5b407097f5cecd93044bd62d631295bf (patch) | |
tree | 120c4e68cd37d86bd294809856c3672dd3704408 /src/mongo/db/dbhelpers.h | |
parent | 990f4171c2a25eeda3952029cc8d77a0420a8b92 (diff) | |
download | mongo-048f738b5b407097f5cecd93044bd62d631295bf.tar.gz |
refactor: choose relevant index for sharding using just the shardKeyPattern
Diffstat (limited to 'src/mongo/db/dbhelpers.h')
-rw-r--r-- | src/mongo/db/dbhelpers.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/mongo/db/dbhelpers.h b/src/mongo/db/dbhelpers.h index 2f50173f1f0..33040c7bf40 100644 --- a/src/mongo/db/dbhelpers.h +++ b/src/mongo/db/dbhelpers.h @@ -148,12 +148,18 @@ namespace mongo { }; /** - * Remove all documents in the range. + * Takes a range, specified by a min and max, and an index, + * specified by keyPattern, and removes all the documents + * in that range found by iterating over the given index. + * + * Caller must hold a write lock on 'ns' + * * Does oplog the individual document deletions. */ static long long removeRange( const string& ns , const BSONObj& min , const BSONObj& max , + const BSONObj& keyPattern , bool yield = false , bool maxInclusive = false , RemoveCallback * callback = 0, |