Skip to content

Commit

Permalink
fix writeback assert
Browse files Browse the repository at this point in the history
  • Loading branch information
erh committed Jan 29, 2011
1 parent 7fa627b commit fa9403f
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions s/client.cpp
Expand Up @@ -144,7 +144,7 @@ namespace mongo {
vector<BSONObj> res;

if ( fromWriteBackListener ) {
warning() << "not doing recusrive writebacks for" << endl;
warning() << "not doing recusrive writeback" << endl;
return res;
}

Expand Down Expand Up @@ -198,16 +198,21 @@ namespace mongo {

if ( writebacks.size() ){
vector<BSONObj> v = _handleWriteBacks( writebacks , fromWriteBackListener );
assert( v.size() == 1 );
result.appendElements( v[0] );
result.appendElementsUnique( res );
result.append( "initialGLEHost" , theShard );
if ( v.size() == 0 && fromWriteBackListener ) {
// ok
}
else {
assert( v.size() == 1 );
result.appendElements( v[0] );
result.appendElementsUnique( res );
result.append( "initialGLEHost" , theShard );
}
}
else {
result.append( "singleShard" , theShard );
result.appendElements( res );
}

return ok;
}

Expand Down

0 comments on commit fa9403f

Please sign in to comment.