summaryrefslogtreecommitdiff
path: root/s/d_split.cpp
diff options
context:
space:
mode:
authorEliot Horowitz <eliot@10gen.com>2011-01-29 02:43:01 -0500
committerEliot Horowitz <eliot@10gen.com>2011-01-29 02:43:01 -0500
commitea4585664e368175c4ab19daaaca4e7a960d736d (patch)
treeedc42e28ccaefd172a6719e979e98ad3ed1c3b5a /s/d_split.cpp
parent1b68b2f53b9493425d9e524bbd81ea4ac0ae3524 (diff)
downloadmongo-ea4585664e368175c4ab19daaaca4e7a960d736d.tar.gz
add an assert in splitVector
Diffstat (limited to 's/d_split.cpp')
-rw-r--r--s/d_split.cpp6
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 );