You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by ji...@apache.org on 2017/12/21 22:28:30 UTC

[4/8] mesos git commit: Exposed runRecoverProtocol() function in recover.hpp.

Exposed runRecoverProtocol() function in recover.hpp.

This function is needed catch-up missing positions of a non-leading
VOTING replica.

Review: https://reviews.apache.org/r/62760/


Project: http://git-wip-us.apache.org/repos/asf/mesos/repo
Commit: http://git-wip-us.apache.org/repos/asf/mesos/commit/826277d0
Tree: http://git-wip-us.apache.org/repos/asf/mesos/tree/826277d0
Diff: http://git-wip-us.apache.org/repos/asf/mesos/diff/826277d0

Branch: refs/heads/master
Commit: 826277d0b19bfe74062f0f6facff0293133262c3
Parents: 6d95a2f
Author: Ilya Pronin <ip...@twopensource.com>
Authored: Thu Dec 21 12:49:50 2017 -0800
Committer: Jie Yu <yu...@gmail.com>
Committed: Thu Dec 21 12:49:50 2017 -0800

----------------------------------------------------------------------
 src/log/recover.cpp |  6 ++----
 src/log/recover.hpp | 10 ++++++++++
 2 files changed, 12 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/mesos/blob/826277d0/src/log/recover.cpp
----------------------------------------------------------------------
diff --git a/src/log/recover.cpp b/src/log/recover.cpp
index b366818..8dab577 100644
--- a/src/log/recover.cpp
+++ b/src/log/recover.cpp
@@ -364,14 +364,12 @@ private:
 };
 
 
-// The wrapper for running the recover protocol. We will re-run the
-// recover protocol if it cannot be finished within 'timeout'.
-static Future<RecoverResponse> runRecoverProtocol(
+Future<RecoverResponse> runRecoverProtocol(
     size_t quorum,
     const Shared<Network>& network,
     const Metadata::Status& status,
     bool autoInitialize,
-    const Duration& timeout = Seconds(10))
+    const Duration& timeout)
 {
   RecoverProtocolProcess* process =
     new RecoverProtocolProcess(

http://git-wip-us.apache.org/repos/asf/mesos/blob/826277d0/src/log/recover.hpp
----------------------------------------------------------------------
diff --git a/src/log/recover.hpp b/src/log/recover.hpp
index 94d6bb2..da216e4 100644
--- a/src/log/recover.hpp
+++ b/src/log/recover.hpp
@@ -32,6 +32,16 @@ namespace mesos {
 namespace internal {
 namespace log {
 
+// Runs the recover protocol. We will re-run the recover protocol if
+// it cannot be finished within 'timeout'.
+process::Future<RecoverResponse> runRecoverProtocol(
+    size_t quorum,
+    const process::Shared<Network>& network,
+    const Metadata::Status& status,
+    bool autoInitialize,
+    const Duration& timeout = Seconds(10));
+
+
 // Recovers a replica by catching up enough missing positions. A
 // replica starts with an empty log (e.g., in the case of a disk
 // failure) should not be allowed to vote. Otherwise, the new votes it