@@ -654,7 +654,6 @@ namespace mongo {
654654 if ( request.getOrdered () )
655655 break ;
656656 }
657- killCurrentOp.checkForInterrupt ();
658657 }
659658 }
660659 else {
@@ -669,7 +668,6 @@ namespace mongo {
669668 if ( request.getOrdered () )
670669 break ;
671670 }
672- killCurrentOp.checkForInterrupt ();
673671 }
674672 }
675673
@@ -772,7 +770,11 @@ namespace mongo {
772770 }
773771 }
774772 catch ( const DBException& ex ) {
775- currResult.error = toWriteError ( ex.toStatus () );
773+ Status stat (ex.toStatus ());
774+ if (ErrorCodes::isInterruption (stat.code ())) {
775+ throw ;
776+ }
777+ currResult.error = toWriteError (stat);
776778 }
777779
778780 //
@@ -999,7 +1001,11 @@ namespace mongo {
9991001 result->fault = new PageFaultException ( ex );
10001002 }
10011003 catch ( const DBException& ex ) {
1002- result->error = toWriteError ( ex.toStatus () );
1004+ Status stat (ex.toStatus ());
1005+ if (ErrorCodes::isInterruption (stat.code ())) {
1006+ throw ;
1007+ }
1008+ result->error = toWriteError (stat);
10031009 }
10041010
10051011 }
@@ -1039,7 +1045,11 @@ namespace mongo {
10391045 result->fault = new PageFaultException ( ex );
10401046 }
10411047 catch ( const DBException& ex ) {
1042- result->error = toWriteError ( ex.toStatus () );
1048+ Status stat (ex.toStatus ());
1049+ if (ErrorCodes::isInterruption (stat.code ())) {
1050+ throw ;
1051+ }
1052+ result->error = toWriteError (stat);
10431053 }
10441054 }
10451055
@@ -1089,7 +1099,11 @@ namespace mongo {
10891099 result->stats .upsertedID = resUpsertedID;
10901100 }
10911101 catch (const DBException& ex) {
1092- result->error = toWriteError (ex.toStatus ());
1102+ Status stat (ex.toStatus ());
1103+ if (ErrorCodes::isInterruption (stat.code ())) {
1104+ throw ;
1105+ }
1106+ result->error = toWriteError (stat);
10931107 }
10941108 }
10951109
@@ -1119,7 +1133,11 @@ namespace mongo {
11191133 result->fault = new PageFaultException ( ex );
11201134 }
11211135 catch ( const DBException& ex ) {
1122- result->error = toWriteError ( ex.toStatus () );
1136+ Status stat (ex.toStatus ());
1137+ if (ErrorCodes::isInterruption (stat.code ())) {
1138+ throw ;
1139+ }
1140+ result->error = toWriteError (stat);
11231141 }
11241142 }
11251143
0 commit comments