You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Qian Zhang <zh...@gmail.com> on 2019/07/01 00:35:13 UTC

Re: Review Request 70887: Added `track`, `pendingFutures` functions for tracking pending futures. (WIP)

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




src/Makefile.am
Lines 1223 (patched)
<https://reviews.apache.org/r/70887/#comment303381>

    It seems the implementation of `future_track.hpp` is not Mesos containerizer specific, do we want to move it a common place?



src/slave/containerizer/mesos/future_track.hpp
Lines 85 (patched)
<https://reviews.apache.org/r/70887/#comment303380>

    Can we use `std::vector` instead?


- Qian Zhang


On June 19, 2019, 10:49 p.m., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70887/
> -----------------------------------------------------------
> 
> (Updated June 19, 2019, 10:49 p.m.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gilbert Song, James Peach, Meng Zhu, and Qian Zhang.
> 
> 
> Bugs: MESOS-9837
>     https://issues.apache.org/jira/browse/MESOS-9837
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch introduces a mechanism for tracking of pending futures.
> This feature can be used to detect hanging operations, which might
> get stuck on a blocking operation or asynchronously. Both `track`
> and `pendingFutures` functions depend on `PendingFutureTracker`
> class, which is instantiated the first time they are accessed.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/future_track.hpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70887/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70887: Added `PendingFutureTracker` class for tracking pending futures.

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Июль 1, 2019, 12:35 д.п., Qian Zhang wrote:
> > src/Makefile.am
> > Lines 1223 (patched)
> > <https://reviews.apache.org/r/70887/diff/2/?file=2151422#file2151422line1223>
> >
> >     It seems the implementation of `future_track.hpp` is not Mesos containerizer specific, do we want to move it a common place?

Moved it to `src/common/future_track.hpp`.


- Andrei


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


On Июнь 19, 2019, 2:49 п.п., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70887/
> -----------------------------------------------------------
> 
> (Updated Июнь 19, 2019, 2:49 п.п.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gilbert Song, James Peach, Meng Zhu, and Qian Zhang.
> 
> 
> Bugs: MESOS-9837
>     https://issues.apache.org/jira/browse/MESOS-9837
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch introduces a mechanism for tracking pending futures.
> This feature allows detection of hanging operations, which get
> stuck on a blocking operation or asynchronously. However, this
> feature does not provide any mechanism for tracking pending
> promises, because `Promise` objects might not be accessible in
> various cases. Thereby, we introduce a new class that can be
> used to track pending futures, so it might facilitate debugging
> of stuck issues.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/common/future_track.hpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70887/diff/3/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>


Re: Review Request 70887: Added `track`, `pendingFutures` functions for tracking pending futures. (WIP)

Posted by Andrei Budnik <ab...@mesosphere.com>.

> On Июль 1, 2019, 12:35 д.п., Qian Zhang wrote:
> > src/slave/containerizer/mesos/future_track.hpp
> > Lines 85 (patched)
> > <https://reviews.apache.org/r/70887/diff/2/?file=2151423#file2151423line85>
> >
> >     Can we use `std::vector` instead?

The implementation relies on STL containers that do not invalidate iterators on container modification. An iterator returned by the `pending.emplace` in the `addFuture` method is captured by the future callbacks. This iterator references a corresponding item in the `pending` list, which gets removed once the future is ready.


- Andrei


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


On Июнь 19, 2019, 2:49 п.п., Andrei Budnik wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/70887/
> -----------------------------------------------------------
> 
> (Updated Июнь 19, 2019, 2:49 п.п.)
> 
> 
> Review request for mesos, Benjamin Mahler, Gilbert Song, James Peach, Meng Zhu, and Qian Zhang.
> 
> 
> Bugs: MESOS-9837
>     https://issues.apache.org/jira/browse/MESOS-9837
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This patch introduces a mechanism for tracking of pending futures.
> This feature can be used to detect hanging operations, which might
> get stuck on a blocking operation or asynchronously. Both `track`
> and `pendingFutures` functions depend on `PendingFutureTracker`
> class, which is instantiated the first time they are accessed.
> 
> 
> Diffs
> -----
> 
>   src/Makefile.am 761dde1d63e0f4f1ac4ab86f129f84f3746d3153 
>   src/slave/containerizer/mesos/future_track.hpp PRE-CREATION 
> 
> 
> Diff: https://reviews.apache.org/r/70887/diff/2/
> 
> 
> Testing
> -------
> 
> 
> Thanks,
> 
> Andrei Budnik
> 
>