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

Ship it!


For posterity, can you update the description of this review to describe the 
fix in question?

Looks good, without me looking too much into ZK.


src/detector/detector.cpp
<https://reviews.apache.org/r/7746/#comment27647>

    s/the/a since there can be many contending detectors, correct?



src/detector/detector.cpp
<https://reviews.apache.org/r/7746/#comment27648>

    ditto s/the/a



src/detector/detector.cpp
<https://reviews.apache.org/r/7746/#comment27649>

    s/the contender/a contender



src/detector/detector.cpp
<https://reviews.apache.org/r/7746/#comment27650>

    s/its/it's



src/detector/detector.cpp
<https://reviews.apache.org/r/7746/#comment27651>

    Maybe a little bit about why it will never know? I'm assuming there's some 
zk semantics that cause this?



src/tests/zookeeper_tests.cpp
<https://reviews.apache.org/r/7746/#comment27652>

    Can you add a comment on this one, since this is the meat of the test, 
right?
    
    // Ensure we get the noMasterDetected call?


- Ben Mahler


On Oct. 26, 2012, 11:18 p.m., Vinod Kone wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/7746/
> -----------------------------------------------------------
> 
> (Updated Oct. 26, 2012, 11:18 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Ben Mahler.
> 
> 
> Description
> -------
> 
> Fixed test
> 
> 
> added comment for expire session
> 
> 
> Fix for master detector
> 
> 
> Failed test
> 
> 
> This addresses bug MESOS-299.
>     https://issues.apache.org/jira/browse/MESOS-299
> 
> 
> Diffs
> -----
> 
>   src/detector/detector.hpp d859b080b99e23d511458a27272db33c5486bb4b 
>   src/detector/detector.cpp 62df8bdf539eb13b2a6dc00eb2f6a07381d59106 
>   src/slave/slave.cpp 5af7464aae17c00a0e707421982d7cb055aabc6c 
>   src/tests/zookeeper_server.hpp 6355e8479a636c889945eead12d863b827d78929 
>   src/tests/zookeeper_tests.cpp 4415a33b94dd6ca360a7dd3ca49f4c29ee25f5e8 
> 
> Diff: https://reviews.apache.org/r/7746/diff/
> 
> 
> Testing
> -------
> 
> Test output before the fix:
> 
> [vinod@VKone ~/workspace/apache/mesos/build (vinod/master_detector_fix)]$ 
> GLOG_v=1 ./bin/mesos-tests.sh --verbose 
> --gtest_filter="*ZooKeeperTest.MasterDetectorExpire*" 
> ....
> ....
> I1026 00:05:39.087263 27279360 detector.cpp:286] Master detector connected to 
> ZooKeeper ...
> I1026 00:05:39.087425 27279360 detector.cpp:303] Trying to create path 
> '/mesos' in ZooKeeper
> I1026 00:05:39.087811 26742784 detector.cpp:286] Master detector connected to 
> ZooKeeper ...
> I1026 00:05:39.087836 26742784 detector.cpp:303] Trying to create path 
> '/mesos' in ZooKeeper
> I1026 00:05:39.102313 27279360 detector.cpp:467] Master detector found 0 
> registered masters
> I1026 00:05:39.110910 26742784 detector.cpp:333] Created ephemeral/sequence 
> znode at '/mesos/0000000000'
> I1026 00:05:39.111507 27815936 detector.cpp:467] Master detector found 1 
> registered masters
> I1026 00:05:39.111590 26742784 detector.cpp:467] Master detector found 1 
> registered masters
> I1026 00:05:39.114651 27815936 detector.cpp:502] Master detector got new 
> master pid: (1)@192.168.1.127:51375
> I1026 00:05:39.114917 26742784 detector.cpp:502] Master detector got new 
> master pid: (1)@192.168.1.127:51375
> 2012-10-26 
> 00:05:39,116:15851(0x10fa9f000):ZOO_ERROR@handle_socket_error_msg@1603: 
> Socket [127.0.0.1:51378] zk retcode=-4, errno=64(Host is down): failed while 
> receiving a server response
> I1026 00:05:39.116739 27279360 detector.cpp:378] Master detector lost 
> connection to ZooKeeper, attempting to reconnect ...
> 2012-10-26 
> 00:05:42,450:15851(0x10fa9f000):ZOO_ERROR@handle_socket_error_msg@1621: 
> Socket [127.0.0.1:51378] zk retcode=-112, errno=70(Stale NFS file handle): 
> sessionId=0x13a9be3f5b90000 has expired.
> W1026 00:05:42.450742 27279360 detector.cpp:397] Master detector ZooKeeper 
> session expired!
> I1026 00:05:42.454856 27279360 detector.cpp:286] Master detector connected to 
> ZooKeeper ...
> I1026 00:05:42.454888 27279360 detector.cpp:303] Trying to create path 
> '/mesos' in ZooKeeper
> I1026 00:05:42.501096 27279360 detector.cpp:467] Master detector found 1 
> registered masters
> ../../src/tests/zookeeper_tests.cpp:332: Failure
> Failed
> Waited too long for 'newMasterDetectedCall2'
> ../../src/tests/zookeeper_tests.cpp:324: Failure
> Actual function call count doesn't match EXPECT_CALL(slave, 
> newMasterDetected(master.self()))...
>          Expected: to be called once
>            Actual: never called - unsatisfied and active
> I1026 00:05:44.844130 1898458304 zookeeper_server.cpp:181] Shutdown 
> ZooKeeperServer on port 51378
> [  FAILED  ] ZooKeeperTest.MasterDetectorExpireZKSession (5929 ms)
> [----------] 1 test from ZooKeeperTest (5929 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (6147 ms total)
> [  PASSED  ] 0 tests.
> [  FAILED  ] 1 test, listed below:
> [  FAILED  ] ZooKeeperTest.MasterDetectorExpireZKSession
> 
> 
> Test output after the fix:
> 
> [vinod@VKone ~/workspace/apache/mesos/build (vinod/master_detector_fix)]$ 
> GLOG_v=1 ./bin/mesos-tests.sh --verbose 
> --gtest_filter="*ZooKeeperTest.MasterDetectorExpire*" 
> ...
> ...
> I1025 23:42:01.587967 26742784 detector.cpp:286] Master detector connected to 
> ZooKeeper ...
> I1025 23:42:01.588099 26742784 detector.cpp:303] Trying to create path 
> '/mesos' in ZooKeeper
> I1025 23:42:01.588544 27279360 detector.cpp:286] Master detector connected to 
> ZooKeeper ...
> I1025 23:42:01.588577 27279360 detector.cpp:303] Trying to create path 
> '/mesos' in ZooKeeper
> I1025 23:42:01.609194 26742784 detector.cpp:333] Created ephemeral/sequence 
> znode at '/mesos/0000000000'
> I1025 23:42:01.610599 27279360 detector.cpp:467] Master detector found 1 
> registered masters
> I1025 23:42:01.610780 26742784 detector.cpp:467] Master detector found 1 
> registered masters
> I1025 23:42:01.613991 27279360 detector.cpp:502] Master detector got new 
> master pid: (1)@192.168.1.127:51025
> I1025 23:42:01.614141 26742784 detector.cpp:502] Master detector got new 
> master pid: (1)@192.168.1.127:51025
> 2012-10-25 
> 23:42:01,616:12480(0x10faa8000):ZOO_ERROR@handle_socket_error_msg@1603: 
> Socket [127.0.0.1:51028] zk retcode=-4, errno=64(Host is down): failed while 
> receiving a server response
> I1025 23:42:01.616317 26742784 detector.cpp:378] Master detector lost 
> connection to ZooKeeper, attempting to reconnect ...
> 2012-10-25 
> 23:42:04,950:12480(0x10faa8000):ZOO_ERROR@handle_socket_error_msg@1621: 
> Socket [127.0.0.1:51028] zk retcode=-112, errno=70(Stale NFS file handle): 
> sessionId=0x13a9bce54800001 has expired.
> W1025 23:42:04.950316 26742784 detector.cpp:397] Master detector ZooKeeper 
> session expired!
> I1025 23:42:04.954572 27815936 detector.cpp:286] Master detector connected to 
> ZooKeeper ...
> I1025 23:42:04.954607 27815936 detector.cpp:303] Trying to create path 
> '/mesos' in ZooKeeper
> I1025 23:42:05.008098 27815936 detector.cpp:467] Master detector found 1 
> registered masters
> I1025 23:42:05.008566 27815936 detector.cpp:502] Master detector got new 
> master pid: (1)@192.168.1.127:51025
> I1025 23:42:05.010418 1898458304 zookeeper_server.cpp:181] Shutdown 
> ZooKeeperServer on port 51028
> [       OK ] ZooKeeperTest.MasterDetectorExpireZKSession (3633 ms)
> [----------] 1 test from ZooKeeperTest (3634 ms total)
> 
> [----------] Global test environment tear-down
> [==========] 1 test from 1 test case ran. (4068 ms total)
> [  PASSED  ] 1 test.
> 
> 
> Thanks,
> 
> Vinod Kone
> 
>

Reply via email to