diff options
author | Eliot Horowitz <eliot@10gen.com> | 2011-01-29 02:43:01 -0500 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2011-01-29 02:43:01 -0500 |
commit | ea4585664e368175c4ab19daaaca4e7a960d736d (patch) | |
tree | edc42e28ccaefd172a6719e979e98ad3ed1c3b5a /s | |
parent | 1b68b2f53b9493425d9e524bbd81ea4ac0ae3524 (diff) | |
download | mongo-ea4585664e368175c4ab19daaaca4e7a960d736d.tar.gz |
add an assert in splitVector
Diffstat (limited to 's')
-rw-r--r-- | s/d_split.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/s/d_split.cpp b/s/d_split.cpp index d61bee22412..12fdc1dcfff 100644 --- a/s/d_split.cpp +++ b/s/d_split.cpp @@ -353,9 +353,11 @@ namespace mongo { splitKeys.push_back( c->currKey() ); while ( cc->ok() ) { currCount++; - if ( currCount > keyCount ) { - BSONObj currKey = c->currKey(); + BSONObj currKey = c->currKey(); + assert( currKey.woCompare( max ) <= 0 ); + + if ( currCount > keyCount ) { // Do not use this split key if it is the same used in the previous split point. if ( currKey.woCompare( splitKeys.back() ) == 0 ) { tooFrequentKeys.insert( currKey ); |