You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Guangya Liu <gy...@gmail.com> on 2015/09/01 06:26:03 UTC
Review Request 37989: Replace hard-coded reap interval with a constant
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37989/
-----------------------------------------------------------
Review request for mesos and Ben Mahler.
Repository: mesos
Description
-------
Replace hard-coded reap interval with a constant
Diffs
-----
3rdparty/libprocess/include/process/reap.hpp ca5acc4c8f5a62a49b7fde83946e283ea40baa65
3rdparty/libprocess/src/reap.cpp 9a994b052c7920a16557c3d880ad499a5efd43cb
Diff: https://reviews.apache.org/r/37989/diff/
Testing
-------
Thanks,
Guangya Liu
Re: Review Request 37989: Replace hard-coded reap interval with a
constant
Posted by Neil Conway <ne...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37989/#review97247
-----------------------------------------------------------
3rdparty/libprocess/include/process/reap.hpp (line 36)
<https://reviews.apache.org/r/37989/#comment153058>
"constexpr" is probably better.
- Neil Conway
On Sept. 1, 2015, 4:26 a.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37989/
> -----------------------------------------------------------
>
> (Updated Sept. 1, 2015, 4:26 a.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-1935
> https://issues.apache.org/jira/browse/MESOS-1935
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Replace hard-coded reap interval with a constant
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/reap.hpp ca5acc4c8f5a62a49b7fde83946e283ea40baa65
> 3rdparty/libprocess/src/reap.cpp 9a994b052c7920a16557c3d880ad499a5efd43cb
>
> Diff: https://reviews.apache.org/r/37989/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 37989: Replace hard-coded reap interval with a
constant
Posted by Guangya Liu <gy...@gmail.com>.
> On 九月 2, 2015, 12:47 a.m., Ben Mahler wrote:
> > Hey Guangya, the point of MESOS-1935 was to use these constant functions throughout the code base:
> >
> > ```
> > ? mesos git:(master) ? grep -R 'Seconds(1)' src/tests
> > src/tests/containerizer/cgroups_tests.cpp: if (elapsed > Seconds(1)) {
> > src/tests/containerizer/docker_tests.cpp: docker->inspect(containerName, Seconds(1));
> > src/tests/containerizer/docker_tests.cpp: inspect = docker->inspect(containerName, Seconds(1));
> > src/tests/containerizer/isolator_tests.cpp: } while (waited < Seconds(1));
> > src/tests/containerizer/isolator_tests.cpp: } while (waited < Seconds(1));
> > src/tests/containerizer/launch_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/fault_tolerance_tests.cpp: Clock::advance(Seconds(1)); // TODO(benh): Pull out constant from Slave.
> > src/tests/gc_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/gc_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/health_check_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/limiter.hpp: MockRateLimiter() : process::RateLimiter(1, Seconds(1)) {}
> > src/tests/log_tests.cpp: EXPECT_GT(Seconds(1), stopwatch.elapsed());
> > src/tests/log_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/log_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/master_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/rate_limiting_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/rate_limiting_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/rate_limiting_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
> > src/tests/slave_tests.cpp: Clock::advance(Seconds(1));
> > ```
> >
> > Some of these can be replaced by the MAX_REAP_INTERVAL(), for example, this one:
> > https://github.com/apache/mesos/blob/0.24.0-rc1/src/tests/slave_recovery_tests.cpp#L1687
Thanks Ben, I will abandon this as the Mesos project do not allow uploading one patch with both 3rd party and mesos. A new RR was here https://reviews.apache.org/r/38046/
- Guangya
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37989/#review97372
-----------------------------------------------------------
On 九月 1, 2015, 5:30 a.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37989/
> -----------------------------------------------------------
>
> (Updated 九月 1, 2015, 5:30 a.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-1935
> https://issues.apache.org/jira/browse/MESOS-1935
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Replace hard-coded reap interval with a constant
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/reap.hpp ca5acc4c8f5a62a49b7fde83946e283ea40baa65
> 3rdparty/libprocess/src/reap.cpp 9a994b052c7920a16557c3d880ad499a5efd43cb
>
> Diff: https://reviews.apache.org/r/37989/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 37989: Replace hard-coded reap interval with a
constant
Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37989/#review97372
-----------------------------------------------------------
Hey Guangya, the point of MESOS-1935 was to use these constant functions throughout the code base:
```
➜ mesos git:(master) ✗ grep -R 'Seconds(1)' src/tests
src/tests/containerizer/cgroups_tests.cpp: if (elapsed > Seconds(1)) {
src/tests/containerizer/docker_tests.cpp: docker->inspect(containerName, Seconds(1));
src/tests/containerizer/docker_tests.cpp: inspect = docker->inspect(containerName, Seconds(1));
src/tests/containerizer/isolator_tests.cpp: } while (waited < Seconds(1));
src/tests/containerizer/isolator_tests.cpp: } while (waited < Seconds(1));
src/tests/containerizer/launch_tests.cpp: Clock::advance(Seconds(1));
src/tests/fault_tolerance_tests.cpp: Clock::advance(Seconds(1)); // TODO(benh): Pull out constant from Slave.
src/tests/gc_tests.cpp: Clock::advance(Seconds(1));
src/tests/gc_tests.cpp: Clock::advance(Seconds(1));
src/tests/health_check_tests.cpp: Clock::advance(Seconds(1));
src/tests/limiter.hpp: MockRateLimiter() : process::RateLimiter(1, Seconds(1)) {}
src/tests/log_tests.cpp: EXPECT_GT(Seconds(1), stopwatch.elapsed());
src/tests/log_tests.cpp: Clock::advance(Seconds(1));
src/tests/log_tests.cpp: Clock::advance(Seconds(1));
src/tests/master_tests.cpp: Clock::advance(Seconds(1));
src/tests/rate_limiting_tests.cpp: Clock::advance(Seconds(1));
src/tests/rate_limiting_tests.cpp: Clock::advance(Seconds(1));
src/tests/rate_limiting_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_recovery_tests.cpp: Clock::advance(Seconds(1));
src/tests/slave_tests.cpp: Clock::advance(Seconds(1));
```
Some of these can be replaced by the MAX_REAP_INTERVAL(), for example, this one:
https://github.com/apache/mesos/blob/0.24.0-rc1/src/tests/slave_recovery_tests.cpp#L1687
- Ben Mahler
On Sept. 1, 2015, 5:30 a.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37989/
> -----------------------------------------------------------
>
> (Updated Sept. 1, 2015, 5:30 a.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-1935
> https://issues.apache.org/jira/browse/MESOS-1935
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Replace hard-coded reap interval with a constant
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/reap.hpp ca5acc4c8f5a62a49b7fde83946e283ea40baa65
> 3rdparty/libprocess/src/reap.cpp 9a994b052c7920a16557c3d880ad499a5efd43cb
>
> Diff: https://reviews.apache.org/r/37989/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 37989: Replace hard-coded reap interval with a
constant
Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37989/#review97256
-----------------------------------------------------------
Patch looks great!
Reviews applied: [37989]
All tests passed.
- Mesos ReviewBot
On Sept. 1, 2015, 5:30 a.m., Guangya Liu wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/37989/
> -----------------------------------------------------------
>
> (Updated Sept. 1, 2015, 5:30 a.m.)
>
>
> Review request for mesos and Ben Mahler.
>
>
> Bugs: MESOS-1935
> https://issues.apache.org/jira/browse/MESOS-1935
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Replace hard-coded reap interval with a constant
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/include/process/reap.hpp ca5acc4c8f5a62a49b7fde83946e283ea40baa65
> 3rdparty/libprocess/src/reap.cpp 9a994b052c7920a16557c3d880ad499a5efd43cb
>
> Diff: https://reviews.apache.org/r/37989/diff/
>
>
> Testing
> -------
>
>
> Thanks,
>
> Guangya Liu
>
>
Re: Review Request 37989: Replace hard-coded reap interval with a
constant
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37989/
-----------------------------------------------------------
(Updated 九月 1, 2015, 5:30 a.m.)
Review request for mesos and Ben Mahler.
Changes
-------
Address Neil's comments
Bugs: MESOS-1935
https://issues.apache.org/jira/browse/MESOS-1935
Repository: mesos
Description
-------
Replace hard-coded reap interval with a constant
Diffs (updated)
-----
3rdparty/libprocess/include/process/reap.hpp ca5acc4c8f5a62a49b7fde83946e283ea40baa65
3rdparty/libprocess/src/reap.cpp 9a994b052c7920a16557c3d880ad499a5efd43cb
Diff: https://reviews.apache.org/r/37989/diff/
Testing
-------
Thanks,
Guangya Liu
Re: Review Request 37989: Replace hard-coded reap interval with a
constant
Posted by Guangya Liu <gy...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/37989/
-----------------------------------------------------------
(Updated 九月 1, 2015, 4:26 a.m.)
Review request for mesos and Ben Mahler.
Bugs: MESOS-1935
https://issues.apache.org/jira/browse/MESOS-1935
Repository: mesos
Description
-------
Replace hard-coded reap interval with a constant
Diffs
-----
3rdparty/libprocess/include/process/reap.hpp ca5acc4c8f5a62a49b7fde83946e283ea40baa65
3rdparty/libprocess/src/reap.cpp 9a994b052c7920a16557c3d880ad499a5efd43cb
Diff: https://reviews.apache.org/r/37989/diff/
Testing
-------
Thanks,
Guangya Liu