diff options
author | Alberto Lerner <alerner@10gen.com> | 2010-10-20 16:19:56 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2010-10-26 15:51:25 -0400 |
commit | 0737ad69095b8d0d036805705f989f76ca81bc86 (patch) | |
tree | fda655bd73331beee10e73db2dcf9fc07ddf9202 | |
parent | b41a9f678c72ecaa2f509df00ef79c67d216d662 (diff) | |
download | mongo-0737ad69095b8d0d036805705f989f76ca81bc86.tar.gz |
SERVER-1979 check max key before requesting a move
-rw-r--r-- | s/balance.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/s/balance.cpp b/s/balance.cpp index f79e1d8e060..33cafdfc9da 100644 --- a/s/balance.cpp +++ b/s/balance.cpp @@ -54,13 +54,13 @@ namespace mongo { const BSONObj& chunkToMove = chunkInfo.chunk; ChunkPtr c = cm->findChunk( chunkToMove["min"].Obj() ); - if ( c->getMin().woCompare( chunkToMove["min"].Obj() ) ){ + if ( c->getMin().woCompare( chunkToMove["min"].Obj() ) || c->getMax().woCompare( chunkToMove["max"].Obj() ) ) { // likely a split happened somewhere - cm = cfg->getChunkManager( chunkInfo.ns , true ); + cm = cfg->getChunkManager( chunkInfo.ns , true /* reload */); assert( cm ); c = cm->findChunk( chunkToMove["min"].Obj() ); - if ( c->getMin().woCompare( chunkToMove["min"].Obj() ) ){ + if ( c->getMin().woCompare( chunkToMove["min"].Obj() ) || c->getMax().woCompare( chunkToMove["max"].Obj() ) ) { log() << "chunk mismatch after reload, ignoring will retry issue cm: " << c->getMin() << " min: " << chunkToMove["min"].Obj() << endl; continue; |