-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/58421/#review172008
-----------------------------------------------------------
Can you update one of the tests in master_contender_detector_tests to use a configured session
timeout value rather than the constant?
src/master/contender/contender.cpp
Line 61 (original), 62-65 (patched)
<https://reviews.apache.org/r/58421/#comment245050>
How about?
```
return new ZooKeeperMasterContender(
url.get(),
zkSessionTimeout_.get(MASTER_CONTENDER_ZK_SESSION_TIMEOUT));
```
src/master/contender/zookeeper.hpp
Lines 49 (patched)
<https://reviews.apache.org/r/58421/#comment245051>
no need for default?
src/master/contender/zookeeper.cpp
Lines 50 (patched)
<https://reviews.apache.org/r/58421/#comment245052>
one arg per line.
src/master/contender/zookeeper.cpp
Lines 74 (patched)
<https://reviews.apache.org/r/58421/#comment245053>
one arg per line.
src/master/contender/zookeeper.cpp
Line 106 (original), 109 (patched)
<https://reviews.apache.org/r/58421/#comment245054>
one arg per line.
src/master/detector/detector.cpp
Line 70 (original), 71-75 (patched)
<https://reviews.apache.org/r/58421/#comment245055>
ditto. see above.
src/master/detector/zookeeper.hpp
Lines 51 (patched)
<https://reviews.apache.org/r/58421/#comment245056>
ditto. see above.
src/master/detector/zookeeper.cpp
Lines 60 (patched)
<https://reviews.apache.org/r/58421/#comment245057>
one arg per line.
src/master/detector/zookeeper.cpp
Line 91 (original), 93 (patched)
<https://reviews.apache.org/r/58421/#comment245058>
one arg per line.
src/master/detector/zookeeper.cpp
Lines 269 (patched)
<https://reviews.apache.org/r/58421/#comment245059>
one arg per line.
- Vinod Kone
On April 13, 2017, 3:44 p.m., Ilya Pronin wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/58421/
> -----------------------------------------------------------
>
> (Updated April 13, 2017, 3:44 p.m.)
>
>
> Review request for mesos, Benjamin Mahler and Vinod Kone.
>
>
> Bugs: MESOS-7387
> https://issues.apache.org/jira/browse/MESOS-7387
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Currently `ZooKeeperMasterContender` and `ZooKeeperMasterDetector` use
> hardcoded session timeouts and do not respect `--zk_session_timeout`
> option. This patch fixes it.
>
>
> Diffs
> -----
>
> include/mesos/master/contender.hpp 2c485ef2f24b3aa1b36b764b4780248835a1d9d5
> include/mesos/master/detector.hpp f53c7c0bbeaed0b263d2634dc6eb15481d2d90b2
> src/master/contender/contender.cpp cc486a176d14e61a2434ce3677c8741963a39057
> src/master/contender/zookeeper.hpp becb93fbc04031c133f42f44f3cf406a27262444
> src/master/contender/zookeeper.cpp 1aa8f53fc9b0733ac3edb2b4288b7225fac25828
> src/master/detector/detector.cpp 0ba29ca9455b85f73cee6787e251b9442c6f97ea
> src/master/detector/zookeeper.hpp 5b531e0f1fed7297bb73c5b02e8ef51d0c27ca38
> src/master/detector/zookeeper.cpp a737d2403e480d14f1cd345b48af2833d2fa3284
> src/master/main.cpp 90d159e248924f6806271dda1ced6d37dfa5f5c9
>
>
> Diff: https://reviews.apache.org/r/58421/diff/1/
>
>
> Testing
> -------
>
> Ran `make check`.
>
> Manually verified that all 4 ZK session negotiate 20 sec timeout when `--zk_session_timeout=20secs`.
> ```
> 2017-04-13 15:29:21,313:67863(0x70000028d000):ZOO_INFO@zookeeper_init@800: Initiating
client connection, host=192.168.99.100:2181 sessionTimeout=20000 watcher=0x107617130 sessionId=0
sessionPasswd=<null> context=0x7f999ad15f90 flags=0
> 2017-04-13 15:29:21,314:67863(0x700000310000):ZOO_INFO@zookeeper_init@800: Initiating
client connection, host=192.168.99.100:2181 sessionTimeout=20000 watcher=0x107617130 sessionId=0
sessionPasswd=<null> context=0x7f999ad164f0 flags=0
> 2017-04-13 15:29:21,316:67863(0x70000020a000):ZOO_INFO@zookeeper_init@800: Initiating
client connection, host=192.168.99.100:2181 sessionTimeout=20000 watcher=0x107617130 sessionId=0
sessionPasswd=<null> context=0x7f999ae05900 flags=0
> 2017-04-13 15:29:21,316:67863(0x700000104000):ZOO_INFO@zookeeper_init@800: Initiating
client connection, host=192.168.99.100:2181 sessionTimeout=20000 watcher=0x107617130 sessionId=0
sessionPasswd=<null> context=0x7f999ae05a80 flags=0
> 2017-04-13 15:29:21,327:67863(0x700000622000):ZOO_INFO@check_events@1775: session establishment
complete on server [192.168.99.100:2181], sessionId=0x15b67b0efd3000c, negotiated timeout=20000
> 2017-04-13 15:29:21,333:67863(0x700000728000):ZOO_INFO@check_events@1775: session establishment
complete on server [192.168.99.100:2181], sessionId=0x15b67b0efd3000d, negotiated timeout=20000
> 2017-04-13 15:29:21,337:67863(0x70000082e000):ZOO_INFO@check_events@1775: session establishment
complete on server [192.168.99.100:2181], sessionId=0x15b67b0efd3000e, negotiated timeout=20000
> 2017-04-13 15:29:21,347:67863(0x700000934000):ZOO_INFO@check_events@1775: session establishment
complete on server [192.168.99.100:2181], sessionId=0x15b67b0efd3000f, negotiated timeout=20000
> ```
>
>
> Thanks,
>
> Ilya Pronin
>
>
|