mesos-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jojy Varghese" <j...@mesosphere.io>
Subject Re: Review Request 41235: Cleaned up the untar method in docker puller.
Date Fri, 11 Dec 2015 20:19:27 GMT


> On Dec. 11, 2015, 7 p.m., Jojy Varghese wrote:
> > src/slave/containerizer/mesos/provisioner/docker/puller.cpp, line 117
> > <https://reviews.apache.org/r/41235/diff/1/?file=1159660#file1159660line117>
> >
> >     If the future is not expected to be ready when we reach here, should we do a
.then on it instead of expecting it to be ready and returning failure?
> 
> Jie Yu wrote:
>     How do you use a .then here?
>     
>     The main issue with the original code is that we start io::read after the process
has finished. This is potentially problematic because the subprocess might write a lot of
stuff to stderr and be blocked due to the fact that the pipe is full. We have to start the
read early, instead of waiting for the subprocess to terminate first.
> 
> Jojy Varghese wrote:
>     Since the read future is not guaranteed to be ready by the time we reach here, i
was thinking that we should add a continuation to that future to read the output when its
ready (or for any event). Isnt it? Also, if the pipe is waiting to be flushed, then dont we
have to retry read in a loop?
> 
> Jie Yu wrote:
>     > Since the read future is not guaranteed to be ready by the time we reach here
>     
>     It will be in one of the following state once 'await' finished: READY, FAILED, DISCARDED.
Why do you need a then here?
>     
>     io::read continuesly and asynchrously read from stderr and will stop if EOF is reached
or some error occured. 'await' won't become ready if io::read hasn't finished.

Gotcha. I didnt know "await" details. I know something now :). Thanks Jie.


- Jojy


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


On Dec. 11, 2015, 7:51 p.m., Jie Yu wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/41235/
> -----------------------------------------------------------
> 
> (Updated Dec. 11, 2015, 7:51 p.m.)
> 
> 
> Review request for mesos, Ben Mahler, Gilbert Song, Jojy Varghese, and Timothy Chen.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> Cleaned up the untar method in docker puller.
> 
> The extra promise is not needed.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/mesos/provisioner/docker/puller.cpp 4aa4a9c4074d96c30c3bceea59d071feeecae2ea

> 
> Diff: https://reviews.apache.org/r/41235/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Jie Yu
> 
>


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message