You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@mesos.apache.org by Ben Mahler <be...@gmail.com> on 2015/06/13 00:40:34 UTC

Review Request 35404: Fixed http::Request::client to be set correctly.

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

Review request for mesos and Jie Yu.


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


Repository: mesos


Description
-------

This now uses `Socket::peer` to augment the `http::Request`.


Diffs
-----

  3rdparty/libprocess/src/process.cpp aadd7bb0ae12b93336900c76d8d5aaa4421ea198 
  3rdparty/libprocess/src/tests/http_tests.cpp 8444b9c961d04b932188b2ac37e2a42aafda1abd 

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


Testing
-------

Updated the test.


Thanks,

Ben Mahler


Re: Review Request 35404: Fixed http::Request::client to be set correctly.

Posted by Ben Mahler <be...@gmail.com>.

> On June 12, 2015, 11:20 p.m., Jie Yu wrote:
> > Have you tested this?

Yep, the test was updated to properly test this, and I verified manually. :)


> On June 12, 2015, 11:20 p.m., Jie Yu wrote:
> > 3rdparty/libprocess/src/process.cpp, line 593
> > <https://reviews.apache.org/r/35404/diff/1/?file=983948#file983948line593>
> >
> >     Not sure if this will cause a scalability issue since we are calling getpeername everytime there are some requests coming in. Maybe we should cache the peer address when the socket is accepted. Can you add a TODO?

Added a TODO on Socket::peer which matches the existing one in Socket::address. FWIW I measure about 1 microsecond for this call, excluding timer overhead, so should be ok without the caching, but I'd love to avoid the syscall overhead here! :)


- Ben


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


On June 12, 2015, 10:40 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35404/
> -----------------------------------------------------------
> 
> (Updated June 12, 2015, 10:40 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-2519
>     https://issues.apache.org/jira/browse/MESOS-2519
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This now uses `Socket::peer` to augment the `http::Request`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp aadd7bb0ae12b93336900c76d8d5aaa4421ea198 
>   3rdparty/libprocess/src/tests/http_tests.cpp 8444b9c961d04b932188b2ac37e2a42aafda1abd 
> 
> Diff: https://reviews.apache.org/r/35404/diff/
> 
> 
> Testing
> -------
> 
> Updated the test.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request 35404: Fixed http::Request::client to be set correctly.

Posted by Jie Yu <yu...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/35404/#review87781
-----------------------------------------------------------

Ship it!


Have you tested this?


3rdparty/libprocess/src/process.cpp
<https://reviews.apache.org/r/35404/#comment140199>

    Not sure if this will cause a scalability issue since we are calling getpeername everytime there are some requests coming in. Maybe we should cache the peer address when the socket is accepted. Can you add a TODO?


- Jie Yu


On June 12, 2015, 10:40 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35404/
> -----------------------------------------------------------
> 
> (Updated June 12, 2015, 10:40 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-2519
>     https://issues.apache.org/jira/browse/MESOS-2519
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This now uses `Socket::peer` to augment the `http::Request`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp aadd7bb0ae12b93336900c76d8d5aaa4421ea198 
>   3rdparty/libprocess/src/tests/http_tests.cpp 8444b9c961d04b932188b2ac37e2a42aafda1abd 
> 
> Diff: https://reviews.apache.org/r/35404/diff/
> 
> 
> Testing
> -------
> 
> Updated the test.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>


Re: Review Request 35404: Fixed http::Request::client to be set correctly.

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


Patch looks great!

Reviews applied: [35403, 35404]

All tests passed.

- Mesos ReviewBot


On June 12, 2015, 10:40 p.m., Ben Mahler wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/35404/
> -----------------------------------------------------------
> 
> (Updated June 12, 2015, 10:40 p.m.)
> 
> 
> Review request for mesos and Jie Yu.
> 
> 
> Bugs: MESOS-2519
>     https://issues.apache.org/jira/browse/MESOS-2519
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This now uses `Socket::peer` to augment the `http::Request`.
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/src/process.cpp aadd7bb0ae12b93336900c76d8d5aaa4421ea198 
>   3rdparty/libprocess/src/tests/http_tests.cpp 8444b9c961d04b932188b2ac37e2a42aafda1abd 
> 
> Diff: https://reviews.apache.org/r/35404/diff/
> 
> 
> Testing
> -------
> 
> Updated the test.
> 
> 
> Thanks,
> 
> Ben Mahler
> 
>