You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Jiang Yan Xu <ya...@jxu.me> on 2014/01/03 23:45:21 UTC
Review Request 16590: LeaderContender::withdraw() now always return ‘false’ if there is no membership to withdraw.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16590/
-----------------------------------------------------------
Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
Repository: mesos-git
Description
-------
This includes when:
- withdraw() is called before contend()
- withdraw() is called after contend() but before the contender learns that it fails to obtain the candidacy
- withdraw() is called after the contender has learned that it had failed to obtain the candidacy
Diffs
-----
src/tests/zookeeper_tests.cpp 94d324a355b4d2189c317d73df0a174ccc38a853
src/zookeeper/contender.hpp f45c0dfee4d41e269996a94cfbed71e878c76b13
src/zookeeper/contender.cpp e857afa033bcaef06e38da997bd0c947c6153b21
Diff: https://reviews.apache.org/r/16590/diff/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 16590: LeaderContender::withdraw() now always return ‘false’ if there is no membership to withdraw.
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16590/#review31674
-----------------------------------------------------------
Ship it!
Took a look with Vinod, just one comment from my initial look.
src/zookeeper/contender.hpp
<https://reviews.apache.org/r/16590/#comment60505>
or because there's nothing to withdraw?
Saying not contended _yet_ seems to suggest an impending operation.
- Ben Mahler
On Jan. 3, 2014, 10:45 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16590/
> -----------------------------------------------------------
>
> (Updated Jan. 3, 2014, 10:45 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> This includes when:
> - withdraw() is called before contend()
> - withdraw() is called after contend() but before the contender learns that it fails to obtain the candidacy
> - withdraw() is called after the contender has learned that it had failed to obtain the candidacy
>
>
> Diffs
> -----
>
> src/tests/zookeeper_tests.cpp 94d324a355b4d2189c317d73df0a174ccc38a853
> src/zookeeper/contender.hpp f45c0dfee4d41e269996a94cfbed71e878c76b13
> src/zookeeper/contender.cpp e857afa033bcaef06e38da997bd0c947c6153b21
>
> Diff: https://reviews.apache.org/r/16590/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16590: LeaderContender::withdraw() now always return ‘false’ if there is no membership to withdraw.
Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16590/#review31897
-----------------------------------------------------------
Ship it!
Ship It!
- Vinod Kone
On Jan. 15, 2014, 12:51 a.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16590/
> -----------------------------------------------------------
>
> (Updated Jan. 15, 2014, 12:51 a.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Bugs: MESOS-892
> https://issues.apache.org/jira/browse/MESOS-892
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> This includes when:
> - withdraw() is called before contend()
> - withdraw() is called after contend() but before the contender learns that it fails to obtain the candidacy
> - withdraw() is called after the contender has learned that it had failed to obtain the candidacy
>
>
> Diffs
> -----
>
> src/tests/zookeeper_tests.cpp 94d324a355b4d2189c317d73df0a174ccc38a853
> src/zookeeper/contender.hpp f45c0dfee4d41e269996a94cfbed71e878c76b13
> src/zookeeper/contender.cpp e857afa033bcaef06e38da997bd0c947c6153b21
>
> Diff: https://reviews.apache.org/r/16590/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16590: LeaderContender::withdraw() now always return ‘false’ if there is no membership to withdraw.
Posted by Jiang Yan Xu <ya...@jxu.me>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16590/
-----------------------------------------------------------
(Updated Jan. 14, 2014, 4:51 p.m.)
Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
Changes
-------
Addressed comments.
Bugs: MESOS-892
https://issues.apache.org/jira/browse/MESOS-892
Repository: mesos-git
Description
-------
This includes when:
- withdraw() is called before contend()
- withdraw() is called after contend() but before the contender learns that it fails to obtain the candidacy
- withdraw() is called after the contender has learned that it had failed to obtain the candidacy
Diffs (updated)
-----
src/tests/zookeeper_tests.cpp 94d324a355b4d2189c317d73df0a174ccc38a853
src/zookeeper/contender.hpp f45c0dfee4d41e269996a94cfbed71e878c76b13
src/zookeeper/contender.cpp e857afa033bcaef06e38da997bd0c947c6153b21
Diff: https://reviews.apache.org/r/16590/diff/
Testing
-------
make check.
Thanks,
Jiang Yan Xu
Re: Review Request 16590: LeaderContender::withdraw() now always return ‘false’ if there is no membership to withdraw.
Posted by Jiang Yan Xu <ya...@jxu.me>.
> On Jan. 14, 2014, 12:22 p.m., Vinod Kone wrote:
> > I prefer withdraw() to return Failure() instead of false when contend() hasn't been called, but I'll leave it up to you.
OK. I'll leave it to return `bool`.
> On Jan. 14, 2014, 12:22 p.m., Vinod Kone wrote:
> > src/zookeeper/contender.cpp, line 226
> > <https://reviews.apache.org/r/16590/diff/1/?file=413865#file413865line226>
> >
> > Mention that withdrawing will be set to false in cancel().
It is mentioned three lines below where 'withdrawing' is checked so I think it should be sufficiently clear.
- Jiang Yan
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16590/#review31768
-----------------------------------------------------------
On Jan. 14, 2014, 4:51 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16590/
> -----------------------------------------------------------
>
> (Updated Jan. 14, 2014, 4:51 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Bugs: MESOS-892
> https://issues.apache.org/jira/browse/MESOS-892
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> This includes when:
> - withdraw() is called before contend()
> - withdraw() is called after contend() but before the contender learns that it fails to obtain the candidacy
> - withdraw() is called after the contender has learned that it had failed to obtain the candidacy
>
>
> Diffs
> -----
>
> src/tests/zookeeper_tests.cpp 94d324a355b4d2189c317d73df0a174ccc38a853
> src/zookeeper/contender.hpp f45c0dfee4d41e269996a94cfbed71e878c76b13
> src/zookeeper/contender.cpp e857afa033bcaef06e38da997bd0c947c6153b21
>
> Diff: https://reviews.apache.org/r/16590/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>
Re: Review Request 16590: LeaderContender::withdraw() now always return ‘false’ if there is no membership to withdraw.
Posted by Vinod Kone <vi...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/16590/#review31768
-----------------------------------------------------------
Ship it!
I prefer withdraw() to return Failure() instead of false when contend() hasn't been called, but I'll leave it up to you.
src/tests/zookeeper_tests.cpp
<https://reviews.apache.org/r/16590/#comment60493>
s/results in 'false' return value/returns false/
src/zookeeper/contender.cpp
<https://reviews.apache.org/r/16590/#comment60510>
Pull them back to where they are used?
src/zookeeper/contender.cpp
<https://reviews.apache.org/r/16590/#comment60508>
Mention that withdrawing will be set to false in cancel().
src/zookeeper/contender.cpp
<https://reviews.apache.org/r/16590/#comment60509>
new line
- Vinod Kone
On Jan. 3, 2014, 10:45 p.m., Jiang Yan Xu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/16590/
> -----------------------------------------------------------
>
> (Updated Jan. 3, 2014, 10:45 p.m.)
>
>
> Review request for mesos, Benjamin Hindman, Ben Mahler, and Vinod Kone.
>
>
> Repository: mesos-git
>
>
> Description
> -------
>
> This includes when:
> - withdraw() is called before contend()
> - withdraw() is called after contend() but before the contender learns that it fails to obtain the candidacy
> - withdraw() is called after the contender has learned that it had failed to obtain the candidacy
>
>
> Diffs
> -----
>
> src/tests/zookeeper_tests.cpp 94d324a355b4d2189c317d73df0a174ccc38a853
> src/zookeeper/contender.hpp f45c0dfee4d41e269996a94cfbed71e878c76b13
> src/zookeeper/contender.cpp e857afa033bcaef06e38da997bd0c947c6153b21
>
> Diff: https://reviews.apache.org/r/16590/diff/
>
>
> Testing
> -------
>
> make check.
>
>
> Thanks,
>
> Jiang Yan Xu
>
>