You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Joris Van Remoortere <jo...@gmail.com> on 2015/03/19 20:23:45 UTC

Re: Review Request 28485: Provide a default bind() in Socket: any port localhost.

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

(Updated March 19, 2015, 7:23 p.m.)


Review request for mesos, Benjamin Hindman and Niklas Nielsen.


Changes
-------

Rebased.


Repository: mesos


Description
-------

This makes it clearer when we intend to bind on a specific ip:port (socket.bind(node)) and when we just want to bind to any local port (socket.bind()).


Diffs (updated)
-----

  3rdparty/libprocess/include/process/address.hpp 0f0a577bd1b8940f71fc486dcb1be7aa55d57ab2 
  3rdparty/libprocess/include/process/socket.hpp 2c4258775bd90f91f1922a3cf2bb4ddf5c334881 
  3rdparty/libprocess/src/process.cpp e7b029ba97e640c2102548c190ba62b30602f43d 

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


Testing
-------

make check


Thanks,

Joris Van Remoortere


Re: Review Request 28485: Provide a default bind() in Socket: any port localhost.

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

Ship it!


Ship It!

- Jie Yu


On March 20, 2015, 6:24 p.m., Joris Van Remoortere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28485/
> -----------------------------------------------------------
> 
> (Updated March 20, 2015, 6:24 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Niklas Nielsen.
> 
> 
> Bugs: MESOS-2527
>     https://issues.apache.org/jira/browse/MESOS-2527
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This makes it clearer when we intend to bind on a specific ip:port (socket.bind(node)) and when we just want to bind to any local port (socket.bind()).
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 0f0a577bd1b8940f71fc486dcb1be7aa55d57ab2 
>   3rdparty/libprocess/include/process/socket.hpp 2c4258775bd90f91f1922a3cf2bb4ddf5c334881 
>   3rdparty/libprocess/src/process.cpp e7b029ba97e640c2102548c190ba62b30602f43d 
> 
> Diff: https://reviews.apache.org/r/28485/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>


Re: Review Request 28485: Provide a default bind() in Socket: any port localhost.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28485/
-----------------------------------------------------------

(Updated March 20, 2015, 6:24 p.m.)


Review request for mesos, Benjamin Hindman and Niklas Nielsen.


Changes
-------

Removing static local and returning by value instead. RVO will optimize this out anyways.


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


Repository: mesos


Description
-------

This makes it clearer when we intend to bind on a specific ip:port (socket.bind(node)) and when we just want to bind to any local port (socket.bind()).


Diffs (updated)
-----

  3rdparty/libprocess/include/process/address.hpp 0f0a577bd1b8940f71fc486dcb1be7aa55d57ab2 
  3rdparty/libprocess/include/process/socket.hpp 2c4258775bd90f91f1922a3cf2bb4ddf5c334881 
  3rdparty/libprocess/src/process.cpp e7b029ba97e640c2102548c190ba62b30602f43d 

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


Testing
-------

make check


Thanks,

Joris Van Remoortere


Re: Review Request 28485: Provide a default bind() in Socket: any port localhost.

Posted by Joris Van Remoortere <jo...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/28485/
-----------------------------------------------------------

(Updated March 20, 2015, 5:42 p.m.)


Review request for mesos, Benjamin Hindman and Niklas Nielsen.


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


Repository: mesos


Description
-------

This makes it clearer when we intend to bind on a specific ip:port (socket.bind(node)) and when we just want to bind to any local port (socket.bind()).


Diffs
-----

  3rdparty/libprocess/include/process/address.hpp 0f0a577bd1b8940f71fc486dcb1be7aa55d57ab2 
  3rdparty/libprocess/include/process/socket.hpp 2c4258775bd90f91f1922a3cf2bb4ddf5c334881 
  3rdparty/libprocess/src/process.cpp e7b029ba97e640c2102548c190ba62b30602f43d 

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


Testing
-------

make check


Thanks,

Joris Van Remoortere


Re: Review Request 28485: Provide a default bind() in Socket: any port localhost.

Posted by Joris Van Remoortere <jo...@gmail.com>.

> On March 19, 2015, 10:27 p.m., Jie Yu wrote:
> > 3rdparty/libprocess/include/process/address.hpp, lines 34-38
> > <https://reviews.apache.org/r/28485/diff/4/?file=900318#file900318line34>
> >
> >     Just curious, what's the IPv6 story here? Do you need a LOCALHOST_ANY_V6() in the future?

from what I understand: IPv4 vs IPv6 will be abstracted away from Address (into IP). Depending on if this is environment variable based or not, we may or may not need a second function.


- Joris


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


On March 20, 2015, 6:24 p.m., Joris Van Remoortere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28485/
> -----------------------------------------------------------
> 
> (Updated March 20, 2015, 6:24 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Niklas Nielsen.
> 
> 
> Bugs: MESOS-2527
>     https://issues.apache.org/jira/browse/MESOS-2527
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This makes it clearer when we intend to bind on a specific ip:port (socket.bind(node)) and when we just want to bind to any local port (socket.bind()).
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 0f0a577bd1b8940f71fc486dcb1be7aa55d57ab2 
>   3rdparty/libprocess/include/process/socket.hpp 2c4258775bd90f91f1922a3cf2bb4ddf5c334881 
>   3rdparty/libprocess/src/process.cpp e7b029ba97e640c2102548c190ba62b30602f43d 
> 
> Diff: https://reviews.apache.org/r/28485/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>


Re: Review Request 28485: Provide a default bind() in Socket: any port localhost.

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



3rdparty/libprocess/include/process/address.hpp
<https://reviews.apache.org/r/28485/#comment125013>

    Just curious, what's the IPv6 story here? Do you need a LOCALHOST_ANY_V6() in the future?



3rdparty/libprocess/include/process/address.hpp
<https://reviews.apache.org/r/28485/#comment125014>

    Returning `const Address&` to a static variable is problematic during teardown in a multi-threaded enviornment because it'll be destructed while some thread might still be using it.
    
    So please return a copy or use a pointer for the static local variable.


- Jie Yu


On March 19, 2015, 7:23 p.m., Joris Van Remoortere wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/28485/
> -----------------------------------------------------------
> 
> (Updated March 19, 2015, 7:23 p.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Niklas Nielsen.
> 
> 
> Repository: mesos
> 
> 
> Description
> -------
> 
> This makes it clearer when we intend to bind on a specific ip:port (socket.bind(node)) and when we just want to bind to any local port (socket.bind()).
> 
> 
> Diffs
> -----
> 
>   3rdparty/libprocess/include/process/address.hpp 0f0a577bd1b8940f71fc486dcb1be7aa55d57ab2 
>   3rdparty/libprocess/include/process/socket.hpp 2c4258775bd90f91f1922a3cf2bb4ddf5c334881 
>   3rdparty/libprocess/src/process.cpp e7b029ba97e640c2102548c190ba62b30602f43d 
> 
> Diff: https://reviews.apache.org/r/28485/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Joris Van Remoortere
> 
>