add an assert in splitVector

This commit is contained in:
Eliot Horowitz
2011-01-29 02:43:01 -05:00
parent 1b68b2f53b
commit ea4585664e

View File

@@ -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 );