summaryrefslogtreecommitdiff
path: root/s/d_split.cpp
diff options
context:
space:
mode:
authorAntonin Kral <a.kral@bobek.cz>2011-04-07 07:35:46 +0200
committerAntonin Kral <a.kral@bobek.cz>2011-04-07 07:35:46 +0200
commit8d913e98e8058c6322975a858f884a769735bb43 (patch)
tree52da0129272024f7132594b8227d81ec72f83af1 /s/d_split.cpp
parent582fc32574a3b158c81e49cb00e6ae59205e66ba (diff)
downloadmongodb-8d913e98e8058c6322975a858f884a769735bb43.tar.gz
Imported Upstream version 1.8.1
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 0896803..66fe38e 100644
--- a/s/d_split.cpp
+++ b/s/d_split.cpp
@@ -269,7 +269,7 @@ namespace mongo {
maxSplitPoints = maxSplitPointsElem.numberLong();
}
- long long maxChunkObjects = 0;
+ long long maxChunkObjects = Chunk::MaxObjectPerChunk;
BSONElement MaxChunkObjectsElem = jsobj[ "maxChunkObjects" ];
if ( MaxChunkObjectsElem.isNumber() ) {
maxChunkObjects = MaxChunkObjectsElem.numberLong();
@@ -425,7 +425,8 @@ namespace mongo {
currCount = 0;
log() << "splitVector doing another cycle because of force, keyCount now: " << keyCount << endl;
- c.reset( new BtreeCursor( d , d->idxNo(*idx) , *idx , min , max , false , 1 ) );
+ bc = new BtreeCursor( d , d->idxNo(*idx) , *idx , min , max , false , 1 );
+ c.reset( bc );
cc.reset( new ClientCursor( QueryOption_NoCursorTimeout , c , ns ) );
}
@@ -442,6 +443,7 @@ namespace mongo {
// Remove the sentinel at the beginning before returning and add fieldnames.
splitKeys.erase( splitKeys.begin() );
+ assert( c.get() );
for ( vector<BSONObj>::iterator it = splitKeys.begin(); it != splitKeys.end() ; ++it ) {
*it = bc->prettyKey( *it );
}