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


reviewed everything except the new master_contender_detector tests.


src/master/master.cpp
<https://reviews.apache.org/r/13087/#comment54119>

    CHECK(!lost.isDiscarded())



src/sched/sched.cpp
<https://reviews.apache.org/r/13087/#comment54161>

    kill this.



src/sched/sched.cpp
<https://reviews.apache.org/r/13087/#comment54366>

    Pull this out of before the if loop.



src/sched/sched.cpp
<https://reviews.apache.org/r/13087/#comment54368>

    Once you kill the body of this 'else' you can just change it to 'else if'.



src/sched/sched.cpp
<https://reviews.apache.org/r/13087/#comment54367>

    Kill this.



src/sched/sched.cpp
<https://reviews.apache.org/r/13087/#comment54162>

    new line.



src/slave/slave.cpp
<https://reviews.apache.org/r/13087/#comment54369>

    We should move this to '__recover()'.
    
    Finally we can take advantage of having detector in the slave's control :)



src/slave/slave.cpp
<https://reviews.apache.org/r/13087/#comment54375>

    You can simplify this too.
    
    I propose this:
    
    void Slave::detected(..)
    {
      CHECK(state == DISCONNECTED ||
            state == RUNNING ||
            state == TERMINATING) << state;
    
       if (state == TERMINATING) {
        LOG(INFO) << "Skipping registration because slave is terminating";
        return;
       }
    
      CHECK(flags.recover == "reconnect");
    
      CHECK(pid.isReady());
      master = pid.get();  
    
      if (master.isSome()) {
       LOG..
       link(master.get());
          statusUpdateManager>newMasterDetected(master.get());
    
        doReliableRegistration();
      } else if (master.isNone()) {
         LOG(INFO)..
         state = DISCONNECTED;
       } else {
         LOG(ERROR)..
         state = DISCONNECTED;
       }
    
      detector->detect();
    
    }



src/slave/slave.cpp
<https://reviews.apache.org/r/13087/#comment54373>

    This should be LOG(FATAL) once we start detection in __recover().



src/slave/slave.cpp
<https://reviews.apache.org/r/13087/#comment54372>

    Kill this TODO now that we can do both of these!
    
    For the first part, as mentioned earlier, start detection in __recover().
    
    Can we do two too? Unsubscribe from detector when shutdown is called? The 
tricky part would be that a 'detected' message might already be enqueued. 
Thoughts?
    



src/tests/authentication_tests.cpp
<https://reviews.apache.org/r/13087/#comment54381>

    Consider a constructor that just takes a scheduler and master and uses 
DEFAULT_FRAMEWORK_INFO, DEFAULT_CREDENTIAL and its own detector.



src/tests/cluster.hpp
<https://reviews.apache.org/r/13087/#comment54384>

    Can't you just do return new StandaloneMasterDetector(..) ?



src/tests/mesos.hpp
<https://reviews.apache.org/r/13087/#comment54390>

    Why set to NULL?


- Vinod Kone


On Oct. 30, 2013, 5:15 p.m., Jiang Yan Xu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/13087/
> -----------------------------------------------------------
> 
> (Updated Oct. 30, 2013, 5:15 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
> 
> 
> Bugs: MESOS-496
>     https://issues.apache.org/jira/browse/MESOS-496
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> See summary.
> 
> 
> Diffs
> -----
> 
>   include/mesos/scheduler.hpp fa1ffe8b24a054556593d31eeae3fd1ac1761fb5 
>   src/Makefile.am a11c76b998ccc84daca02facddd20a4acb88aa43 
>   src/cli/resolve.cpp b05f5103ca898f74acb7dfe8f423ffc7e1872e09 
>   src/detector/detector.hpp 3aaebfe89f0b4bb5c64e7f4c8974d8b13bc6f6b1 
>   src/detector/detector.cpp 8d9f118757192ca38bcdb26663ed86effbcf3c9e 
>   src/local/local.cpp 180756a929baed4dce97fdb8774f07010587468f 
>   src/local/main.cpp 5995c538077dea301f231668b4b5f905e73e7b3b 
>   src/master/contender.hpp PRE-CREATION 
>   src/master/contender.cpp PRE-CREATION 
>   src/master/detector.hpp PRE-CREATION 
>   src/master/detector.cpp PRE-CREATION 
>   src/master/http.cpp f2a535a002f07784db724f6fdedfb26b271d6327 
>   src/master/main.cpp 45caf9dde0af5995dde73ae82e83e1d7169d17b8 
>   src/master/master.hpp e377af8b3ccd932ae411fa2df4c19642a7310d02 
>   src/master/master.cpp 8e14a070e87ebe579b54d05fb1e8b286edb5e459 
>   src/messages/messages.proto a5dded2c0f3f88a5f7d789ccde6e59f68880374b 
>   src/sched/sched.cpp 3049096a7aeaea6c1063a1bbcef119517daa236c 
>   src/slave/http.cpp 62fbb37a1924062543bf9db4229704bdef91601d 
>   src/slave/main.cpp 750a12766bde64059bfd4635ea077cbd43cb4301 
>   src/slave/slave.hpp 68526f3fb01be6dc19d7e3c8e4ba8220b2c56ccb 
>   src/slave/slave.cpp 74bcbecb8240a4de21efd103be744869a81c72ce 
>   src/tests/allocator_tests.cpp b0beb72273e9d44a407d0e83e6c18a541b212089 
>   src/tests/authentication_tests.cpp 48a9323d03416ad9ee25fc19838d89678ff613bc 
>   src/tests/cluster.hpp bea395a73b09df287fef743dae1aa836f4dac691 
>   src/tests/fault_tolerance_tests.cpp 
> 3989e14eb926d7f9b5c7731aa0713a56fc3fb6e9 
>   src/tests/gc_tests.cpp 5459b78126d3607114ea171d3f76883f8355751c 
>   src/tests/isolator_tests.cpp ab5b00aa7f12dbd299debc1a405ac50c59cec85c 
>   src/tests/master_contender_detector_tests.cpp PRE-CREATION 
>   src/tests/master_detector_tests.cpp 
> 06c586d29996cd599ae58dfd49cf1324aac0a6d6 
>   src/tests/master_tests.cpp bf790d24ff6b2fb199a04caebef523797b075e63 
>   src/tests/mesos.hpp ad39c095f9699fbe7958d52698fd2b0319e84eb9 
>   src/tests/mesos.cpp 351ffd614250847c52657b721a560eb2cf7c9443 
>   src/tests/slave_recovery_tests.cpp 37faf2054750080902cb06b62da9a9e2252c566f 
> 
> Diff: https://reviews.apache.org/r/13087/diff/
> 
> 
> Testing
> -------
> 
> make check 100 times
> 
> 
> Thanks,
> 
> Jiang Yan Xu
> 
>

Reply via email to