----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/14631/#review28918 -----------------------------------------------------------
This looks good, great cleanup! :) Here's how I would have rebased and pulled apart this change into a few logical changes: 1. Updated Network::Broadcast to return a future. 2. Renamed id/coordinator to proposal in log.proto and a few of the C++ files. 3. Added a new missing() call on Replica along with the added const correctness. 4. The meat of the change :) Although it may seem minor, I think review time/difficulty increases quadratically or more with the size of a diff (especially when Paxos is involved ;)), so every bit helps! Anyway, good stuff! src/log/catchup.cpp <https://reviews.apache.org/r/14631/#comment55983> 4 space indent src/log/catchup.cpp <https://reviews.apache.org/r/14631/#comment55985> 4 space indent src/log/catchup.cpp <https://reviews.apache.org/r/14631/#comment55987> Can you add the position number? "Failed to catch-up position " + stringify(*it) + ": " + catching.failure() src/log/catchup.cpp <https://reviews.apache.org/r/14631/#comment55986> Can you elaborate on this comment? It's not clear to me where the unnecessary proposal number bumps will originate and why this prevents it src/log/consensus.hpp <https://reviews.apache.org/r/14631/#comment55995> s/gain/gained/ src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55990> indent with 4 spaces src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55991> Should this be CHECK_EQ? CHECK_EQ will print the actual vs expected when it fails src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55992> CHECK_EQ? src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55993> CHECK_EQ? src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55994> 4 spaces src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55996> 4 spaces src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55997> LOG(FATAL) << "Unknown Action::Type " << action.type(); src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55998> CHECK_EQ src/log/consensus.cpp <https://reviews.apache.org/r/14631/#comment55999> 4 spaces src/log/coordinator.hpp <https://reviews.apache.org/r/14631/#comment55988> Where did the documentation go? src/log/coordinator.cpp <https://reviews.apache.org/r/14631/#comment56000> Are we writing the same data? Technically, aren't we changing the learned bit of the Action when we write it after log::learn? - Ben Mahler On Nov. 13, 2013, 8:41 p.m., Jie Yu wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/14631/ > ----------------------------------------------------------- > > (Updated Nov. 13, 2013, 8:41 p.m.) > > > Review request for mesos and Benjamin Hindman. > > > Bugs: MESOS-736 > https://issues.apache.org/jira/browse/MESOS-736 > > > Repository: mesos-git > > > Description > ------- > > This is the first patch of a series of patches that implement a catch-up > mechanism for replicated log. See the following ticket for more details: > https://issues.apache.org/jira/browse/MESOS-736 > > Here is a brief summary of this patch: (Sorry for the fact that we are not > able to break it into smaller patches :() > > 1) Pulled the original Coordinator logic out and divides it into several > Paxos phases (see src/log/consensus.hpp). Instead of using a blocking > semantics, we implemented all the logics asynchronously. > > 2) In order to ensure the liveness of a catch-uper, we implemented a retry > logic by bumping the proposal number. This also requires us to slightly > change the existing replica protocol. > > 3) Made the "fill" operation independent of the underlying replica. Instead, > introduced a catchup (see src/log/catchup.hpp) function to make sure the > underlying local replica has learned each write. > > 4) Modified the log tests to adapt to the new semantics (see (3) above) > > This is a joint work with Yan Xu. > > > Diffs > ----- > > src/Makefile.am 9780d07 > src/log/catchup.hpp PRE-CREATION > src/log/catchup.cpp PRE-CREATION > src/log/consensus.hpp PRE-CREATION > src/log/consensus.cpp PRE-CREATION > src/log/coordinator.hpp 3f6fb7c > src/log/coordinator.cpp 6e6466f > src/log/log.hpp 77edc7a > src/log/network.hpp d34cf78 > src/log/replica.hpp d1f5ead > src/log/replica.cpp 59a6ff3 > src/messages/log.proto 3d5859f > src/tests/log_tests.cpp ff5f86c > > Diff: https://reviews.apache.org/r/14631/diff/ > > > Testing > ------- > > bin/mesos-tests.sh --gtest_filter=*CoordinatorTest*:*LogTest*:*ReplicaTest* > --gtest_repeat=100 > > > Thanks, > > Jie Yu > >
