summaryrefslogtreecommitdiff
path: root/src/mongo/s/chunk.h
diff options
context:
space:
mode:
authorKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-10-27 17:49:19 -0400
committerKaloian Manassiev <kaloian.manassiev@mongodb.com>2016-10-28 16:29:27 -0400
commitcd9e8e08276dee0d6232042a46d2b78799e33787 (patch)
treec25c7d70d8745986d6ea8a1ba07068cd58df5383 /src/mongo/s/chunk.h
parent4a6e21b8c747877f32362deafcdad603b49b9475 (diff)
downloadmongo-cd9e8e08276dee0d6232042a46d2b78799e33787.tar.gz
SERVER-25665 Cleanup chunk metadata caching library dependencies
No functional changes. Removes unused includes and libraries and moves cluster_write.cpp to be only part of the mongos commands since it is not used elsewhere.
Diffstat (limited to 'src/mongo/s/chunk.h')
-rw-r--r--src/mongo/s/chunk.h15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/mongo/s/chunk.h b/src/mongo/s/chunk.h
index 3df8a9f7e1f..29375b2e326 100644
--- a/src/mongo/s/chunk.h
+++ b/src/mongo/s/chunk.h
@@ -107,9 +107,12 @@ public:
// split support
//
- long long getBytesWritten() const {
- return _dataWritten;
- }
+ /**
+ * Get/increment/set the estimation of how much data was written for this chunk.
+ */
+ uint64_t getBytesWritten() const;
+ void addBytesWritten(uint64_t bytesWrittenIncrement);
+ void setBytesWritten(uint64_t newBytesWritten);
/**
* if the amount of data written nears the max size of a shard
@@ -215,12 +218,6 @@ private:
* @param splitPoints out parameter containing the chosen split points. Can be empty.
*/
std::vector<BSONObj> _determineSplitPoints(OperationContext* txn, bool atMedian) const;
-
- /**
- * initializes _dataWritten with a random value so that a mongos restart
- * wouldn't cause delay in splitting
- */
- static int mkDataWritten();
};
} // namespace mongo