File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -258,7 +258,9 @@ class Restore : public BSONTool {
258258 conn ().runCommand (db, cmd, out);
259259
260260 // wait for ops to propagate to "w" nodes (doesn't warn if w used without replset)
261- conn ().getLastError (false , false , _w);
261+ if ( w > 1 ) {
262+ conn ().getLastError (false , false , _w);
263+ }
262264 }
263265 else if ( endsWith ( _curns.c_str () , " .system.indexes" )) {
264266 /* Index construction is slightly special: when restoring
@@ -308,7 +310,9 @@ class Restore : public BSONTool {
308310 conn ().insert ( _curns , obj );
309311
310312 // wait for insert to propagate to "w" nodes (doesn't warn if w used without replset)
311- conn ().getLastErrorDetailed (false , false , _w);
313+ if ( _w > 1 ) {
314+ conn ().getLastErrorDetailed (false , false , _w);
315+ }
312316 }
313317 }
314318
You can’t perform that action at this time.
0 commit comments