-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/18584/
-----------------------------------------------------------

(Updated March 7, 2014, 8:35 p.m.)


Review request for mesos, Benjamin Hindman and Ben Mahler.


Changes
-------

BenM's.


Bugs: MESOS-984
    https://issues.apache.org/jira/browse/MESOS-984


Repository: mesos-git


Description
-------

Previously, we use onAny to connect most of the steps. As a result, we see a 
lot of the error checking code like the following:

void checked(const Future<Metadata::Status>& future)    
{
  if (!future.isReady()) {
    promise.fail(
        future.isFailed() ?
        "Failed to get replica status: " + future.failure() :
        "Not expecting discarded future");
    terminate(self());
    return;
  }
  ...
}

Another drawback is: discarding becomes difficult and hard to reason.

Now, I cleaned up the code to use the continuation style (i.e., chaining using 
Future.then). The code becomes much more clear now!

Also, I factored out the recover protocol part from the log recover process to 
make the log recover process less cumbersome.

This patch does not change any semantics, but is for MESOS-984 (log auto 
initialization for registrar). Will follow up with a patch to integrate the log 
auto initialization based on this patch.


Diffs (updated)
-----

  src/log/recover.cpp e611a4e 

Diff: https://reviews.apache.org/r/18584/diff/


Testing
-------

make check


Thanks,

Jie Yu

Reply via email to