Permalink
Browse files

Fix replsettest: shouldRetry should create client context SERVER-4626

  • Loading branch information...
1 parent 2bedc3c commit 8c259b9984bb4a791c879438cd1def3b40455041 @kchodorow kchodorow committed Feb 15, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 db/oplog.cpp
View
@@ -636,6 +636,9 @@ namespace mongo {
return false;
}
+ // should already have write lock
+ Client::Context ctx(ns);
+
// we don't have the object yet, which is possible on initial sync. get it.
log() << "replication info adding missing object" << endl; // rare enough we can log
uassert(15916, str::stream() << "Can no longer connect to initial sync source: " << hn, missingObjReader.connect(hn));
@@ -658,7 +661,6 @@ namespace mongo {
return false;
}
else {
- Client::Context ctx(ns);
DiskLoc d = theDataFileMgr.insert(ns, (void*) missingObj.objdata(), missingObj.objsize());
uassert(15917, "Got bad disk location when attempting to insert", !d.isNull());

0 comments on commit 8c259b9

Please sign in to comment.