diff options
author | Benety Goh <benety@mongodb.com> | 2017-02-27 13:59:14 -0500 |
---|---|---|
committer | Benety Goh <benety@mongodb.com> | 2017-02-28 10:47:42 -0500 |
commit | b690ca960b5062ee5b8af034ffe338051a228431 (patch) | |
tree | cb9906432aaba94e767783a1c58eb0688671f4aa | |
parent | de7788989deb47ae381e0710d0ed34c5b7521d30 (diff) | |
download | mongo-b690ca960b5062ee5b8af034ffe338051a228431.tar.gz |
SERVER-26484 removed unreachable code in SyncSourceFeedback. Blacklisting of reporter sync source will be done in BackgroundSync and SyncSourceResolver.
-rw-r--r-- | src/mongo/db/repl/sync_source_feedback.cpp | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/src/mongo/db/repl/sync_source_feedback.cpp b/src/mongo/db/repl/sync_source_feedback.cpp index 0778c407948..3705c755e11 100644 --- a/src/mongo/db/repl/sync_source_feedback.cpp +++ b/src/mongo/db/repl/sync_source_feedback.cpp @@ -129,25 +129,10 @@ Status SyncSourceFeedback::_updateUpstream(OperationContext* txn, if (!status.isOK()) { log() << "SyncSourceFeedback error sending update to " << syncTarget << ": " << status; - - // Some errors should not cause result in blacklisting the sync source. - if (status != ErrorCodes::InvalidSyncSource) { - // The command could not be created because the node is now primary. - } else if (status != ErrorCodes::NodeNotFound) { - // The command could not be created, likely because this node was removed from the set. - } else { - // Blacklist sync target for .5 seconds and find a new one. - stdx::lock_guard<stdx::mutex> lock(_mtx); - auto replCoord = repl::ReplicationCoordinator::get(txn); - const auto blacklistDuration = Milliseconds{500}; - const auto until = Date_t::now() + blacklistDuration; - log() << "Blacklisting " << syncTarget << " due to error: '" << status << "' for " - << blacklistDuration << " until: " << until; - replCoord->blacklistSyncSource(syncTarget, until); - bgsync->clearSyncTarget(); - } } + // Sync source blacklisting will be done in BackgroundSync and SyncSourceResolver. + return status; } |