diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-11-29 10:21:19 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-12-04 13:24:55 -0500 |
commit | 95e95613412c33b52bb8a514751550c2447526d4 (patch) | |
tree | b0f86dd04b6c6f8978b6a77f6d29adffab79eddf /src/mongo/db/range_arithmetic.h | |
parent | 7920e242c0def907b502265ca14ddf3d86c98025 (diff) | |
download | mongo-95e95613412c33b52bb8a514751550c2447526d4.tar.gz |
SERVER-31056 Remove usages of ScopedCollectionMetadata default constructor
Diffstat (limited to 'src/mongo/db/range_arithmetic.h')
-rw-r--r-- | src/mongo/db/range_arithmetic.h | 35 |
1 files changed, 3 insertions, 32 deletions
diff --git a/src/mongo/db/range_arithmetic.h b/src/mongo/db/range_arithmetic.h index 7bfdbe1cbd3..75707ca9b44 100644 --- a/src/mongo/db/range_arithmetic.h +++ b/src/mongo/db/range_arithmetic.h @@ -30,7 +30,6 @@ #include <map> #include <string> -#include <vector> #include "mongo/bson/simple_bsonobj_comparator.h" #include "mongo/db/jsobj.h" @@ -94,32 +93,12 @@ bool rangeOverlaps(const BSONObj& inclusiveLower1, const BSONObj& exclusiveUpper2); /** - * Represents a cached chunk information on the shard. - */ -class CachedChunkInfo { -public: - CachedChunkInfo(BSONObj maxKey, ChunkVersion version); - - const BSONObj& getMaxKey() const { - return _maxKey; - } - -private: - BSONObj _maxKey; -}; - -/** - * A RangeMap is a mapping of an inclusive lower BSON key to an upper key and chunk version, using - * standard BSON woCompare. The upper bound is exclusive. + * A RangeMap is a mapping of an inclusive lower BSON key to an exclusive upper key, using standard + * BSON woCompare. * * NOTE: For overlap testing to work correctly, there may be no overlaps present in the map itself. */ -typedef BSONObjIndexedMap<CachedChunkInfo> RangeMap; - -/** - * A RangeVector is a list of [lower,upper) ranges. - */ -typedef std::vector<std::pair<BSONObj, BSONObj>> RangeVector; +typedef BSONObjIndexedMap<BSONObj> RangeMap; /** * Returns true if the provided range map has ranges which overlap the provided range @@ -129,12 +108,4 @@ bool rangeMapOverlaps(const RangeMap& ranges, const BSONObj& inclusiveLower, const BSONObj& exclusiveUpper); -/** - * Returns true if the provided range map exactly contains the provided range - * [inclusiveLower, exclusiveUpper). - */ -bool rangeMapContains(const RangeMap& ranges, - const BSONObj& inclusiveLower, - const BSONObj& exclusiveUpper); - } // namespace mongo |