summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAaron <aaron@10gen.com>2010-03-29 14:14:50 -0700
committerAaron <aaron@10gen.com>2010-03-29 23:25:04 -0700
commit1cab1d1c7c3fbf0e166c7fd6ffbdefbb66ba8dd5 (patch)
tree907fe96cf717ef478ef18aa80e783821c61a6341
parentd979fd7da676eb255294bccaf9e18b7599ba169c (diff)
downloadmongo-1cab1d1c7c3fbf0e166c7fd6ffbdefbb66ba8dd5.tar.gz
SERVER-841 fastsync corner cases
-rw-r--r--db/repl.cpp4
-rw-r--r--jstests/repl/snapshot3.js2
2 files changed, 5 insertions, 1 deletions
diff --git a/db/repl.cpp b/db/repl.cpp
index eb9a641ebec..043e0394920 100644
--- a/db/repl.cpp
+++ b/db/repl.cpp
@@ -1607,6 +1607,7 @@ namespace mongo {
ReplInfo r("replMain load sources");
dblock lk;
ReplSource::loadAll(sources);
+ replSettings.fastsync = false; // only need this param for initial reset
}
if ( sources.empty() ) {
@@ -1861,6 +1862,9 @@ namespace mongo {
createOplog();
boost::thread t(replMasterThread);
}
+
+ while( replSettings.fastsync ) // don't allow writes until we've set up from log
+ sleepmillis( 50 );
}
/* called from main at server startup */
diff --git a/jstests/repl/snapshot3.js b/jstests/repl/snapshot3.js
index 5380bbfe276..296ebd08d4c 100644
--- a/jstests/repl/snapshot3.js
+++ b/jstests/repl/snapshot3.js
@@ -2,7 +2,7 @@
ports = allocatePorts( 3 );
-var baseName = "repl_snapshot2";
+var baseName = "repl_snapshot3";
var basePath = "/data/db/" + baseName;
a = new MongodRunner( ports[ 0 ], basePath + "-arbiter" );