diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-11-22 14:22:43 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-11-28 21:02:19 -0500 |
commit | 88fa04b3791d1e53444601432677bb0cf86dc293 (patch) | |
tree | 7843213368c44d71c82ee0e9550ef88411047fe6 /src/mongo/db/range_arithmetic.h | |
parent | fe8890ff6718850af6082441c62fd6cdfb67e3f4 (diff) | |
download | mongo-88fa04b3791d1e53444601432677bb0cf86dc293.tar.gz |
SERVER-31056 Cleanup MetadataManager and CollectionMetadata
No functional changes, only cleanup to improve readability.
* Removes unused code
* Improve comments
* Hide functionality, which doesn't need to be public
Diffstat (limited to 'src/mongo/db/range_arithmetic.h')
-rw-r--r-- | src/mongo/db/range_arithmetic.h | 34 |
1 files changed, 0 insertions, 34 deletions
diff --git a/src/mongo/db/range_arithmetic.h b/src/mongo/db/range_arithmetic.h index 411602c2ffd..7bfdbe1cbd3 100644 --- a/src/mongo/db/range_arithmetic.h +++ b/src/mongo/db/range_arithmetic.h @@ -94,16 +94,6 @@ bool rangeOverlaps(const BSONObj& inclusiveLower1, const BSONObj& exclusiveUpper2); /** - * Returns -1 if first range is less than the second range, 0 if equal and 1 if - * greater. The ordering is based on comparing both the min first and then uses - * the max as the tie breaker. - */ -int compareRanges(const BSONObj& rangeMin1, - const BSONObj& rangeMax1, - const BSONObj& rangeMin2, - const BSONObj& rangeMax2); - -/** * Represents a cached chunk information on the shard. */ class CachedChunkInfo { @@ -114,13 +104,8 @@ public: return _maxKey; } - const ChunkVersion& getVersion() const { - return _version; - } - private: BSONObj _maxKey; - ChunkVersion _version; }; /** @@ -137,15 +122,6 @@ typedef BSONObjIndexedMap<CachedChunkInfo> RangeMap; typedef std::vector<std::pair<BSONObj, BSONObj>> RangeVector; /** - * Returns the overlap of a range [inclusiveLower, exclusiveUpper) with the provided range map - * as a vector of ranges from the map. - */ -void getRangeMapOverlap(const RangeMap& ranges, - const BSONObj& inclusiveLower, - const BSONObj& exclusiveUpper, - RangeVector* vector); - -/** * Returns true if the provided range map has ranges which overlap the provided range * [inclusiveLower, exclusiveUpper). */ @@ -161,14 +137,4 @@ bool rangeMapContains(const RangeMap& ranges, const BSONObj& inclusiveLower, const BSONObj& exclusiveUpper); -/** - * std::string representation of [inclusiveLower, exclusiveUpper) - */ -std::string rangeToString(const BSONObj& inclusiveLower, const BSONObj& exclusiveUpper); - -/** - * std::string representation of overlapping ranges as a list "[range1),[range2),..." - */ -std::string overlapToString(RangeVector overlap); - } // namespace mongo |