0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00

better method name

This commit is contained in:
Alberto Lerner 2010-10-25 12:28:13 -04:00
parent 9364b46e83
commit 86b6240226
4 changed files with 9 additions and 9 deletions

View File

@ -78,7 +78,7 @@ namespace mongo {
if ( res["split"].trueValue() ) {
log() << "move asked for a split of " << c << endl;
c->simpleSplit( true /* force a split even if not enough data */ );
c->singleSplit( true /* force a split even if not enough data */ );
}
}

View File

@ -230,7 +230,7 @@ namespace mongo {
return multiSplit( splitPoints );
}
ChunkPtr Chunk::simpleSplit( bool force ){
ChunkPtr Chunk::singleSplit( bool force ){
vector<BSONObj> splitPoint;
// If splitting is not obligatory, we may return early if there are not enough data.
@ -324,7 +324,7 @@ namespace mongo {
_manager->_chunkMap[_max] = shared_from_this();
}
// return the second half, if a simple split, or the first new chunk, if a multisplit.
// return the second half, if a single split, or the first new chunk, if a multisplit.
return _manager->findChunk( m[0] );
}
@ -420,7 +420,7 @@ namespace mongo {
// Save the new key boundaries in the configDB.
_manager->save( false /* does not inc 'major', ie no moves, in ShardChunkVersion control */);
// Log all these changes in the configDB's log. We log a simple split differently than a multi-split.
// Log all these changes in the configDB's log. We log a single split differently than a multi-split.
if ( newChunks.size() == 1) {
appendShortVersion( "left" , detail );
newChunks[0]->appendShortVersion( "right" , detail );
@ -499,9 +499,9 @@ namespace mongo {
_dataWritten = 0; // reset so we check often enough
ChunkPtr newShard = simpleSplit( false /* does not force a split if not enough data */ );
ChunkPtr newShard = singleSplit( false /* does not force a split if not enough data */ );
if ( newShard.get() == NULL ){
// simpleSplit would have issued a message if we got here
// singleSplit would have issued a message if we got here
return false;
}

View File

@ -116,10 +116,10 @@ namespace mongo {
* if set to false, will only split if the chunk has reached the currently desired maximum size
* @return if found a key, return a pointer to the first chunk, otherwise return a null pointer
*/
ChunkPtr simpleSplit( bool force );
ChunkPtr singleSplit( bool force );
/**
* Splits this chunk at at the given keys
* Splits this chunk at the given key (or keys)
*
* @param splitPoints the vector of keys that should be used to divide this chunk
* @return shared pointer to the first new Chunk

View File

@ -486,7 +486,7 @@ namespace mongo {
log() << "splitting: " << ns << " shard: " << chunk << endl;
if ( middle.isEmpty() )
chunk->simpleSplit( true /* force a split even if not enough data */ );
chunk->singleSplit( true /* force a split even if not enough data */ );
else {
// sanity check if the key provided is a valid split point