You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Daniel Pravat <dp...@outlook.com> on 2016/04/16 02:19:30 UTC
Re: Review Request 43985: Windows: [1/3] Implemented `sendfile`.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/
-----------------------------------------------------------
(Updated April 16, 2016, 12:19 a.m.)
Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
Summary (updated)
-----------------
Windows: [1/3] Implemented `sendfile`.
Repository: mesos
Description (updated)
-------
Windows: [1/3] Implemented `sendfile`.
Diffs (updated)
-----
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp a7f855dc9d0a87fe3b6d1611e7ae22e4d7cd7b6d
Diff: https://reviews.apache.org/r/43985/diff/
Testing
-------
Build Windows,OSX
Run Windows
Thanks,
Daniel Pravat
Re: Review Request 43985: Windows: [1/3] Implemented `sendfile`.
Posted by Daniel Pravat <dp...@outlook.com>.
> On April 19, 2016, 10:21 p.m., Michael Park wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp, line 45
> > <https://reviews.apache.org/r/43985/diff/3/?file=1347512#file1347512line45>
> >
> > `s/send/sent/`
Thanks!
- Daniel
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/#review129633
-----------------------------------------------------------
On April 16, 2016, 1:10 a.m., Daniel Pravat wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43985/
> -----------------------------------------------------------
>
> (Updated April 16, 2016, 1:10 a.m.)
>
>
> Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Windows: [1/3] Implemented `sendfile`.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp a7f855dc9d0a87fe3b6d1611e7ae22e4d7cd7b6d
>
> Diff: https://reviews.apache.org/r/43985/diff/
>
>
> Testing
> -------
>
> Build Windows,OSX
>
>
> Thanks,
>
> Daniel Pravat
>
>
Re: Review Request 43985: Windows: [1/3] Implemented `sendfile`.
Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/#review129633
-----------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp (lines 33 - 34)
<https://reviews.apache.org/r/43985/#comment193090>
(1) `s/On error, On error,/On error,/`
(2) Remove the extra space in `// Try`. i.e., `// Try`
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp (lines 39 - 40)
<https://reviews.apache.org/r/43985/#comment193089>
```
inline Try<ssize_t, SocketError> sendfile(
int s, int fd, off_t offset, size_t length)
{
```
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp (line 45)
<https://reviews.apache.org/r/43985/#comment193088>
`s/send/sent/`
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp (line 46)
<https://reviews.apache.org/r/43985/#comment193084>
(1) `s/return return/return/`
(2) Based on other syscalls, it seems like we should just do `return SocketError();`. e.g., `close.hpp`, `chroot.hpp`, `fnctl.hpp`, etc. Here and below.
3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp (lines 16 - 17)
<https://reviews.apache.org/r/43985/#comment193103>
When we fork to have separate implementation for `POSIX` and `Windows`, we should keep them completely separate. That is, even though `<stout/error.hpp>` is used in both implementations, they should include them individually.
For example, starting from `3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp` we can't find where `ErrnoError` came from.
3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp (lines 19 - 24)
<https://reviews.apache.org/r/43985/#comment193081>
Let's consolidate this with the `process::network::SocketError` in `3rdparty/libprocess/include/process/network.hpp`.
For now, I think `stout/error.hpp` is the best place to put it.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (lines 16 - 17)
<https://reviews.apache.org/r/43985/#comment193091>
Add a newline in between.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 23)
<https://reviews.apache.org/r/43985/#comment193092>
Backquotes around `Try<ssize_t, WindowsSocketError>`.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (lines 24 - 25)
<https://reviews.apache.org/r/43985/#comment193094>
```
inline Try<ssize_t, SocketError> sendfile(
int s, int fd, off_t offset, size_t length)
{
```
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 27)
<https://reviews.apache.org/r/43985/#comment193095>
`s/ will/, it will/`
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (lines 28 - 30)
<https://reviews.apache.org/r/43985/#comment193100>
Please use the correct C++ casts here for the casts to `HANDLE`, `LONG`.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 30)
<https://reviews.apache.org/r/43985/#comment193096>
`hight_Part`? did we mean `high_part`? Just `high` seems fine too.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 31)
<https://reviews.apache.org/r/43985/#comment193101>
It looks like the second parameter of `SetFilePointer` is `LONG`, not `DWORD`. Why do we cast to `DWORD`? Also, please use C++ cast.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 33)
<https://reviews.apache.org/r/43985/#comment193097>
Should return `SocketError` here (I know they're the same, but still).
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 39)
<https://reviews.apache.org/r/43985/#comment193098>
Should return `SocketError` here (I know they're the same, but still).
- Michael Park
On April 16, 2016, 1:10 a.m., Daniel Pravat wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43985/
> -----------------------------------------------------------
>
> (Updated April 16, 2016, 1:10 a.m.)
>
>
> Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Windows: [1/3] Implemented `sendfile`.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp a7f855dc9d0a87fe3b6d1611e7ae22e4d7cd7b6d
>
> Diff: https://reviews.apache.org/r/43985/diff/
>
>
> Testing
> -------
>
> Build Windows,OSX
>
>
> Thanks,
>
> Daniel Pravat
>
>
Re: Review Request 43985: Windows: [1/4] Implemented `sendfile`.
Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/#review130044
-----------------------------------------------------------
Ship it!
Committed with the following changes.
3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp (line 16)
<https://reviews.apache.org/r/43985/#comment193659>
Remove newline.
3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp
<https://reviews.apache.org/r/43985/#comment193660>
Add newline.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 51)
<https://reviews.apache.org/r/43985/#comment193661>
`s/ return SocketError();/ return SocketError();/`
3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp (lines 119 - 121)
<https://reviews.apache.org/r/43985/#comment193662>
Remove this.
- Michael Park
On April 21, 2016, 6:31 p.m., Daniel Pravat wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43985/
> -----------------------------------------------------------
>
> (Updated April 21, 2016, 6:31 p.m.)
>
>
> Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Windows: [1/4] Implemented `sendfile`.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp cd1bad14919b9d566d5201201d8c3b4a335d5b9f
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp 3828c53c0dbbf370d642189998af75b9af434e9d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp d634491b301632ce6468f86d04f21fa25afbbaaa
>
> Diff: https://reviews.apache.org/r/43985/diff/
>
>
> Testing
> -------
>
> Build Windows,
> OSX: make check
>
>
> Thanks,
>
> Daniel Pravat
>
>
Re: Review Request 43985: Windows: [1/4] Implemented `sendfile`.
Posted by Daniel Pravat <dp...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/
-----------------------------------------------------------
(Updated April 21, 2016, 6:31 p.m.)
Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
Repository: mesos
Description
-------
Windows: [1/4] Implemented `sendfile`.
Diffs (updated)
-----
3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp cd1bad14919b9d566d5201201d8c3b4a335d5b9f
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp 3828c53c0dbbf370d642189998af75b9af434e9d
3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp d634491b301632ce6468f86d04f21fa25afbbaaa
Diff: https://reviews.apache.org/r/43985/diff/
Testing
-------
Build Windows,
OSX: make check
Thanks,
Daniel Pravat
Re: Review Request 43985: Windows: [1/4] Implemented `sendfile`.
Posted by Daniel Pravat <dp...@outlook.com>.
> On April 21, 2016, 2:08 a.m., Michael Park wrote:
> > 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp, line 38
> > <https://reviews.apache.org/r/43985/diff/4/?file=1353400#file1353400line38>
> >
> > Where did the `& MAXDWORD` come from, and why?
This is for clarity. In any case this will go away.
- Daniel
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/#review129828
-----------------------------------------------------------
On April 21, 2016, 6:31 p.m., Daniel Pravat wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43985/
> -----------------------------------------------------------
>
> (Updated April 21, 2016, 6:31 p.m.)
>
>
> Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Windows: [1/4] Implemented `sendfile`.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp cd1bad14919b9d566d5201201d8c3b4a335d5b9f
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp 3828c53c0dbbf370d642189998af75b9af434e9d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp d634491b301632ce6468f86d04f21fa25afbbaaa
>
> Diff: https://reviews.apache.org/r/43985/diff/
>
>
> Testing
> -------
>
> Build Windows,
> OSX: make check
>
>
> Thanks,
>
> Daniel Pravat
>
>
Re: Review Request 43985: Windows: [1/4] Implemented `sendfile`.
Posted by Michael Park <mp...@apache.org>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/#review129828
-----------------------------------------------------------
3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp (lines 25 - 29)
<https://reviews.apache.org/r/43985/#comment193364>
Let's keep these separate. They're indepedent blocks with independent semantics.
```
#ifdef __WINDOWS__
#include <stout/windows/error.hpp>
#endif // __WINDOWS__
using SocketError =
#ifdef __WINDOWS_
WindowsSocketError;
#else
ErrnoError;
#endif // __WINDOWS__
```
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp (line 37)
<https://reviews.apache.org/r/43985/#comment193362>
Backticks around `Try<ssize_t, ErrnoError>`, and `ErrnoError` should be `SocketError`.
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp (line 64)
<https://reviews.apache.org/r/43985/#comment193360>
By "Here and below", I mean these should have also be updated to `return SocketError();`.
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp (line 76)
<https://reviews.apache.org/r/43985/#comment193361>
By "Here and below", I mean these should have also be updated to `return SocketError();`.
3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp
<https://reviews.apache.org/r/43985/#comment193363>
Please add this back.
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 35)
<https://reviews.apache.org/r/43985/#comment193365>
Where did the `& MAXDWORD` come from, and why?
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp (line 43)
<https://reviews.apache.org/r/43985/#comment193366>
I requested to return `SocketError` here, it's marked as resolved but it doesn't seem so.
3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp (lines 119 - 121)
<https://reviews.apache.org/r/43985/#comment193373>
- Michael Park
On April 20, 2016, 4:45 p.m., Daniel Pravat wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/43985/
> -----------------------------------------------------------
>
> (Updated April 20, 2016, 4:45 p.m.)
>
>
> Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
>
>
> Repository: mesos
>
>
> Description
> -------
>
> Windows: [1/4] Implemented `sendfile`.
>
>
> Diffs
> -----
>
> 3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp cd1bad14919b9d566d5201201d8c3b4a335d5b9f
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
> 3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp a7f855dc9d0a87fe3b6d1611e7ae22e4d7cd7b6d
> 3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp d634491b301632ce6468f86d04f21fa25afbbaaa
>
> Diff: https://reviews.apache.org/r/43985/diff/
>
>
> Testing
> -------
>
> Build Windows,
> OSX: make check
>
>
> Thanks,
>
> Daniel Pravat
>
>
Re: Review Request 43985: Windows: [1/4] Implemented `sendfile`.
Posted by Daniel Pravat <dp...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/
-----------------------------------------------------------
(Updated April 20, 2016, 4:45 p.m.)
Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
Summary (updated)
-----------------
Windows: [1/4] Implemented `sendfile`.
Repository: mesos
Description (updated)
-------
Windows: [1/4] Implemented `sendfile`.
Diffs (updated)
-----
3rdparty/libprocess/3rdparty/stout/include/stout/error.hpp cd1bad14919b9d566d5201201d8c3b4a335d5b9f
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp a7f855dc9d0a87fe3b6d1611e7ae22e4d7cd7b6d
3rdparty/libprocess/3rdparty/stout/include/stout/windows/error.hpp d634491b301632ce6468f86d04f21fa25afbbaaa
Diff: https://reviews.apache.org/r/43985/diff/
Testing (updated)
-------
Build Windows,
OSX: make check
Thanks,
Daniel Pravat
Re: Review Request 43985: Windows: [1/3] Implemented `sendfile`.
Posted by Daniel Pravat <dp...@outlook.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/43985/
-----------------------------------------------------------
(Updated April 16, 2016, 1:10 a.m.)
Review request for mesos, Artem Harutyunyan, Alex Clemmer, Joris Van Remoortere, and Michael Park.
Repository: mesos
Description
-------
Windows: [1/3] Implemented `sendfile`.
Diffs (updated)
-----
3rdparty/libprocess/3rdparty/stout/include/stout/os/posix/sendfile.hpp 293f82f6730551491504721e0af28e9537540db1
3rdparty/libprocess/3rdparty/stout/include/stout/os/sendfile.hpp f3197679a9c22b37acae003262e5c6d21e110f56
3rdparty/libprocess/3rdparty/stout/include/stout/os/windows/sendfile.hpp 750ca6749cb028703ed2fb5dec2aac6c5dabea0d
3rdparty/libprocess/3rdparty/stout/include/stout/windows.hpp a7f855dc9d0a87fe3b6d1611e7ae22e4d7cd7b6d
Diff: https://reviews.apache.org/r/43985/diff/
Testing (updated)
-------
Build Windows,OSX
Thanks,
Daniel Pravat