summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorBrandon Diamond <brandon@10gen.com>2011-10-11 09:52:02 -0400
committerBrandon Diamond <brandon@10gen.com>2011-10-11 09:52:02 -0400
commit31bb33c1207a288c49748c869681d96be808622b (patch)
treedf31c500745865624063f4af0ea5554bcef6f6ef /tools
parentf14315265113e7e9a00b06125b6b285dd71ab162 (diff)
downloadmongo-31bb33c1207a288c49748c869681d96be808622b.tar.gz
SERVER-3937: Only call GLE if w > 1
Diffstat (limited to 'tools')
-rw-r--r--tools/restore.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/restore.cpp b/tools/restore.cpp
index b0d73c1a32e..29575028955 100644
--- a/tools/restore.cpp
+++ b/tools/restore.cpp
@@ -258,7 +258,9 @@ public:
conn().runCommand(db, cmd, out);
// wait for ops to propagate to "w" nodes (doesn't warn if w used without replset)
- conn().getLastError(false, false, _w);
+ if ( w > 1 ) {
+ conn().getLastError(false, false, _w);
+ }
}
else if ( endsWith( _curns.c_str() , ".system.indexes" )) {
/* Index construction is slightly special: when restoring
@@ -308,7 +310,9 @@ public:
conn().insert( _curns , obj );
// wait for insert to propagate to "w" nodes (doesn't warn if w used without replset)
- conn().getLastErrorDetailed(false, false, _w);
+ if ( _w > 1 ) {
+ conn().getLastErrorDetailed(false, false, _w);
+ }
}
}