diff options
author | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-01-25 17:50:03 -0500 |
---|---|---|
committer | Kaloian Manassiev <kaloian.manassiev@mongodb.com> | 2017-01-30 09:34:20 -0500 |
commit | 2922aea4adf8e8fe9bab3a5d6e986e7aecba7228 (patch) | |
tree | 6504c17080aafcd6e0280a0f8fb2d8c19514240a /src/mongo/s/chunk.h | |
parent | 03028591aec8f6e8f08c8c2be2f829772822d7dd (diff) | |
download | mongo-2922aea4adf8e8fe9bab3a5d6e986e7aecba7228.tar.gz |
SERVER-27809 Move regular chunk split to the balancer
Diffstat (limited to 'src/mongo/s/chunk.h')
-rw-r--r-- | src/mongo/s/chunk.h | 38 |
1 files changed, 11 insertions, 27 deletions
diff --git a/src/mongo/s/chunk.h b/src/mongo/s/chunk.h index e2509472eb1..dd97c751b87 100644 --- a/src/mongo/s/chunk.h +++ b/src/mongo/s/chunk.h @@ -51,16 +51,6 @@ class Chunk { MONGO_DISALLOW_COPYING(Chunk); public: - enum SplitPointMode { - // Determines the split points that will make the current chunk smaller than - // the current chunk size setting. Gives empty result if chunk is not big enough. - normal, - - // Behaves like normal, with additional special heuristics for "top chunks" - // (the 1 or 2 chunks in the extreme ends of the chunk key space). - autoSplitInternal - }; - Chunk(OperationContext* txn, ChunkManager* manager, const ChunkType& from); Chunk(ChunkManager* manager, @@ -128,7 +118,6 @@ public: * @throws UserException */ StatusWith<boost::optional<ChunkRange>> split(OperationContext* txn, - SplitPointMode mode, size_t* resultingSplits) const; /** @@ -142,12 +131,6 @@ public: } // - // public constants - // - - static const int MaxObjectPerChunk{250000}; - - // // accessors and helpers // @@ -166,9 +149,6 @@ public: ShardId getShardId() const { return _shardId; } - const ChunkManager* getManager() const { - return _manager; - } private: /** @@ -183,16 +163,20 @@ private: // The chunk manager, which owns this chunk. Not owned by the chunk. const ChunkManager* _manager; - BSONObj _min; - BSONObj _max; - ShardId _shardId; + const BSONObj _min; + + const BSONObj _max; + + const ShardId _shardId; + const ChunkVersion _lastmod; - mutable bool _jumbo; - // Statistics for the approximate data written by this chunk - uint64_t _dataWritten; + // Indicates whether this chunk should be treated as jumbo and not attempted to be moved or + // split + mutable bool _jumbo; - // methods, etc.. + // Statistics for the approximate data written to this chunk + mutable uint64_t _dataWritten; /** * Returns the split point that will result in one of the chunk having exactly one |