You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Jojy Varghese <jo...@mesosphere.io> on 2015/10/21 20:13:20 UTC

Review Request 39518: Changed write api.

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

Review request for mesos and Timothy Chen.


Bugs: MESOS-3773
    https://issues.apache.org/jira/browse/MESOS-3773


Repository: mesos


Description
-------

See MESOS-3773.

Change:
io::write(fd, string) has been having issues with junk being written to the
file. Using io::write(fd, void*, size_t) does not have this issue.


Diffs (updated)
-----

  src/slave/containerizer/provisioner/docker/registry_client.cpp 24aa95c5800ff4dfb37465b71421b014b5dd5998 

Diff: https://reviews.apache.org/r/39518/diff/


Testing
-------

Make check.


Thanks,

Jojy Varghese


Re: Review Request 39518: Changed write api.

Posted by Jojy Varghese <jo...@mesosphere.io>.

> On Oct. 23, 2015, 7:59 a.m., Benjamin Bannier wrote:
> > src/slave/containerizer/provisioner/docker/registry_client.cpp, line 642
> > <https://reviews.apache.org/r/39518/diff/1/?file=1102455#file1102455line642>
> >
> >     Wouldn't this potentially cause data loss if the called `write` function cannot dump everything in the `fd`?

Good point. Didnt realize that write could return unfinished. Addressed in https://reviews.apache.org/r/39340/


- Jojy


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


On Oct. 21, 2015, 6:13 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39518/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2015, 6:13 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3773
>     https://issues.apache.org/jira/browse/MESOS-3773
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See MESOS-3773.
> 
> Change:
> io::write(fd, string) has been having issues with junk being written to the
> file. Using io::write(fd, void*, size_t) does not have this issue.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/provisioner/docker/registry_client.cpp 24aa95c5800ff4dfb37465b71421b014b5dd5998 
> 
> Diff: https://reviews.apache.org/r/39518/diff/
> 
> 
> Testing
> -------
> 
> Make check.
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 39518: Changed write api.

Posted by Benjamin Bannier <be...@mesosphere.io>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39518/#review103739
-----------------------------------------------------------



src/slave/containerizer/provisioner/docker/registry_client.cpp (line 615)
<https://reviews.apache.org/r/39518/#comment161819>

    I find it surprising that this would need to be handled here since I would have expected a proper `write` to deal with that correctly.
    
    Are you trying to work-around a bug elsewhere?



src/slave/containerizer/provisioner/docker/registry_client.cpp (line 633)
<https://reviews.apache.org/r/39518/#comment161817>

    This seems to be happen in `write(int fd, void* data, size_t size)` already anyway.



src/slave/containerizer/provisioner/docker/registry_client.cpp (line 641)
<https://reviews.apache.org/r/39518/#comment161818>

    Wouldn't this potentially cause data loss if the called `write` function cannot dump everything in the `fd`?


- Benjamin Bannier


On Oct. 21, 2015, 6:13 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39518/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2015, 6:13 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3773
>     https://issues.apache.org/jira/browse/MESOS-3773
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See MESOS-3773.
> 
> Change:
> io::write(fd, string) has been having issues with junk being written to the
> file. Using io::write(fd, void*, size_t) does not have this issue.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/provisioner/docker/registry_client.cpp 24aa95c5800ff4dfb37465b71421b014b5dd5998 
> 
> Diff: https://reviews.apache.org/r/39518/diff/
> 
> 
> Testing
> -------
> 
> Make check.
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 39518: Changed write api.

Posted by Jojy Varghese <jo...@mesosphere.io>.

> On Oct. 23, 2015, 8:02 a.m., Timothy Chen wrote:
> > src/slave/containerizer/provisioner/docker/registry_client.cpp, line 638
> > <https://reviews.apache.org/r/39518/diff/1/?file=1102455#file1102455line638>
> >
> >     Did we ever find out why before we just use another interface?

I realized that since the registry client refactor already takes care of buffered write (and inadvertantly uses the '''write(fd, char* , size_t) ''' API, I dont need this patch for now and will wait for the refactor patches. The patch that does this is https://reviews.apache.org/r/39340/


- Jojy


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


On Oct. 21, 2015, 6:13 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39518/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2015, 6:13 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3773
>     https://issues.apache.org/jira/browse/MESOS-3773
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See MESOS-3773.
> 
> Change:
> io::write(fd, string) has been having issues with junk being written to the
> file. Using io::write(fd, void*, size_t) does not have this issue.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/provisioner/docker/registry_client.cpp 24aa95c5800ff4dfb37465b71421b014b5dd5998 
> 
> Diff: https://reviews.apache.org/r/39518/diff/
> 
> 
> Testing
> -------
> 
> Make check.
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 39518: Changed write api.

Posted by Timothy Chen <tn...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39518/#review103740
-----------------------------------------------------------



src/slave/containerizer/provisioner/docker/registry_client.cpp (line 637)
<https://reviews.apache.org/r/39518/#comment161820>

    Did we ever find out why before we just use another interface?


- Timothy Chen


On Oct. 21, 2015, 6:13 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39518/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2015, 6:13 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3773
>     https://issues.apache.org/jira/browse/MESOS-3773
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See MESOS-3773.
> 
> Change:
> io::write(fd, string) has been having issues with junk being written to the
> file. Using io::write(fd, void*, size_t) does not have this issue.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/provisioner/docker/registry_client.cpp 24aa95c5800ff4dfb37465b71421b014b5dd5998 
> 
> Diff: https://reviews.apache.org/r/39518/diff/
> 
> 
> Testing
> -------
> 
> Make check.
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>


Re: Review Request 39518: Changed write api.

Posted by Mesos ReviewBot <re...@mesos.apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/39518/#review103480
-----------------------------------------------------------


Patch looks great!

Reviews applied: [39518]

All tests passed.

- Mesos ReviewBot


On Oct. 21, 2015, 6:13 p.m., Jojy Varghese wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/39518/
> -----------------------------------------------------------
> 
> (Updated Oct. 21, 2015, 6:13 p.m.)
> 
> 
> Review request for mesos and Timothy Chen.
> 
> 
> Bugs: MESOS-3773
>     https://issues.apache.org/jira/browse/MESOS-3773
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> See MESOS-3773.
> 
> Change:
> io::write(fd, string) has been having issues with junk being written to the
> file. Using io::write(fd, void*, size_t) does not have this issue.
> 
> 
> Diffs
> -----
> 
>   src/slave/containerizer/provisioner/docker/registry_client.cpp 24aa95c5800ff4dfb37465b71421b014b5dd5998 
> 
> Diff: https://reviews.apache.org/r/39518/diff/
> 
> 
> Testing
> -------
> 
> Make check.
> 
> 
> Thanks,
> 
> Jojy Varghese
> 
>