summaryrefslogtreecommitdiff
path: root/s/d_state.cpp
diff options
context:
space:
mode:
authorAlberto Lerner <alerner@10gen.com>2010-12-04 13:36:26 -0500
committerAlberto Lerner <alerner@10gen.com>2010-12-04 13:36:26 -0500
commit7579d6bbfb4625457e250c2268e804486092f429 (patch)
tree101df0da41ec9f03dd06d97d2f5f0ffbf6842d86 /s/d_state.cpp
parent2f081442997bc039333a35c58644c523ca30f237 (diff)
downloadmongo-7579d6bbfb4625457e250c2268e804486092f429.tar.gz
fix multisplit case and move that logic to manager cloning
Diffstat (limited to 's/d_state.cpp')
-rw-r--r--s/d_state.cpp12
1 files changed, 1 insertions, 11 deletions
diff --git a/s/d_state.cpp b/s/d_state.cpp
index cdb04bc5a4d..eda671069f5 100644
--- a/s/d_state.cpp
+++ b/s/d_state.cpp
@@ -156,17 +156,7 @@ namespace mongo {
ChunkManagersMap::const_iterator it = _chunks.find( ns );
assert( it != _chunks.end() ) ;
-
- ShardChunkManagerPtr p;
- BSONObj startKey = min;
- for ( vector<BSONObj>::const_iterator itKeys = splitKeys.begin(); itKeys != splitKeys.end(); ++itKeys ) {
- BSONObj splitKey = *itKeys;
- ShardChunkManagerPtr cloned( it->second->cloneSplit( startKey , max , splitKey , version ) );
-
- version.incMinor();
- startKey = splitKey;
- p = cloned;
- }
+ ShardChunkManagerPtr p( it->second->cloneSplit( min , max , splitKeys , version ) );
_chunks[ns] = p;
}