summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorScott Hernandez <scotthernandez@gmail.com>2015-11-16 11:01:42 -0500
committerScott Hernandez <scotthernandez@gmail.com>2015-11-16 17:59:33 -0500
commit127c0661fefcfdae2883628e90b57b66ed852406 (patch)
tree277ef9a2d3bfc4996f7b02bb7e65e7d3330042e0
parenta17839c0e21b4b700248a62099c93b84213af18a (diff)
downloadmongo-127c0661fefcfdae2883628e90b57b66ed852406.tar.gz
SERVER-21474 Remove stepdown_while_draining test and failpoint
-rw-r--r--jstests/replsets/stepdown_while_draining.js53
-rw-r--r--src/mongo/db/repl/bgsync.cpp9
2 files changed, 0 insertions, 62 deletions
diff --git a/jstests/replsets/stepdown_while_draining.js b/jstests/replsets/stepdown_while_draining.js
deleted file mode 100644
index 7a2098e4cda..00000000000
--- a/jstests/replsets/stepdown_while_draining.js
+++ /dev/null
@@ -1,53 +0,0 @@
-// This test ensures that a node that steps down while draining no longer deadlocks in the producer
-// thread (SERVER-18994):
-//
-// 1) Start a 3 node set
-// 2) Activate node 1's failpoint to trigger the previously problematic behavior (SERVER-18994)
-// 3) Reconfig forcing node 1 to be PRIMARY
-// 4) Reconfig forcing node 2 back into SECONDARY
-// 5) Do a write on the new PRIMARY with w: all to ensure node 1 did not deadlock in producer thread
-//
-// NB: The fail point used by this test simply adds a long sleep, which greatly increases the
-// likelihood of hitting the previously bad behavior. If this test appears to be flaky on
-// EverGreen, it is entirely possible that behavior is incorrect and that the inherant raciness
-// of this test is the source of the flakiness.
-
-load("jstests/replsets/rslib.js");
-
-(function() {
- "use strict";
- var name = "StepDownWhileDraining";
- var replTest = new ReplSetTest({name: name, nodes: 3});
- var nodes = replTest.nodeList();
- var conns = replTest.startSet();
- replTest.initiate({"_id": name,
- "version": 1,
- "members": [
- { "_id": 0, "host": nodes[0], priority: 3 },
- { "_id": 1, "host": nodes[1], priority: 0 },
- { "_id": 2, "host": nodes[2], arbiterOnly: true}]
- });
-
- var primary = replTest.getPrimary();
- replTest.awaitReplication();
- var config = primary.getDB("local").system.replset.findOne();
- conns[1].getDB("admin").runCommand({configureFailPoint: 'stepDownWhileDrainingFailPoint',
- mode: 'alwaysOn'});
- config.version++;
- config.members[0].priority = 0;
- config.members[1].priority = 3;
- primary.getDB(name).foo.insert({x:1});
- reconfig(replTest, config, true);
- replTest.waitForState(replTest.nodes[1], replTest.PRIMARY, 60 * 1000);
-
- config = replTest.nodes[1].getDB("local").system.replset.findOne();
- config.version++;
- config.members[1].priority = 0;
- config.members[0].priority = 3;
- reconfig(replTest, config, true);
- replTest.waitForState(replTest.nodes[1], replTest.SECONDARY, 60 * 1000);
-
- var primary = replTest.getPrimary();
- assert.writeOK(primary.getDB(name).foo.insert({x:1},
- {writeConcern: {w: 2, wtimeout: 60 * 1000}}));
-}());
diff --git a/src/mongo/db/repl/bgsync.cpp b/src/mongo/db/repl/bgsync.cpp
index 6076178eceb..a414a7f252a 100644
--- a/src/mongo/db/repl/bgsync.cpp
+++ b/src/mongo/db/repl/bgsync.cpp
@@ -115,7 +115,6 @@ Status checkRemoteOplogStart(stdx::function<StatusWith<BSONObj>()> getNextOperat
} // namespace
MONGO_FP_DECLARE(rsBgSyncProduce);
-MONGO_FP_DECLARE(stepDownWhileDrainingFailPoint);
BackgroundSync* BackgroundSync::s_instance = 0;
stdx::mutex BackgroundSync::s_mutex;
@@ -474,10 +473,6 @@ void BackgroundSync::_fetcherCallback(const StatusWith<Fetcher::QueryResponse>&
return;
}
- if (MONGO_FAIL_POINT(stepDownWhileDrainingFailPoint)) {
- sleepsecs(20);
- }
-
// The count of the bytes of the documents read off the network.
int networkDocumentBytes = 0;
std::for_each(documents.cbegin(),
@@ -500,10 +495,6 @@ void BackgroundSync::_fetcherCallback(const StatusWith<Fetcher::QueryResponse>&
// Wait for enough space.
_buffer.waitForSpace(toApplyDocumentBytes);
- if (MONGO_FAIL_POINT(stepDownWhileDrainingFailPoint)) {
- sleepsecs(20);
- }
-
OCCASIONALLY {
LOG(2) << "bgsync buffer has " << _buffer.size() << " bytes";
}