mirror of
https://github.com/mongodb/mongo.git
synced 2024-11-30 09:06:21 +01:00
SERVER-1986 simpler mechanism for picking up split checks if mongos bounces frequently
This commit is contained in:
parent
34613b0bde
commit
bfdf4ba06e
17
s/chunk.cpp
17
s/chunk.cpp
@ -45,15 +45,18 @@ namespace mongo {
|
||||
|
||||
int Chunk::MaxChunkSize = 1024 * 1024 * 64;
|
||||
|
||||
Chunk::Chunk( ChunkManager * manager )
|
||||
: _manager(manager),
|
||||
_lastmod(0), _dataWritten(0)
|
||||
{}
|
||||
Chunk::Chunk( ChunkManager * manager ) : _manager(manager), _lastmod(0) {
|
||||
_setDataWritten();
|
||||
}
|
||||
|
||||
Chunk::Chunk(ChunkManager * info , const BSONObj& min, const BSONObj& max, const Shard& shard)
|
||||
: _manager(info), _min(min), _max(max), _shard(shard),
|
||||
_lastmod(0), _dataWritten(0)
|
||||
{}
|
||||
: _manager(info), _min(min), _max(max), _shard(shard), _lastmod(0) {
|
||||
_setDataWritten();
|
||||
}
|
||||
|
||||
void Chunk::_setDataWritten(){
|
||||
_dataWritten = rand() % ( MaxChunkSize / 5 );
|
||||
}
|
||||
|
||||
string Chunk::getns() const {
|
||||
assert( _manager );
|
||||
|
Loading…
Reference in New Issue
Block a user