[tarantool-patches] Re: [PATCH 3/7] swim: do not rebind when new 'port' is 0

Konstantin Osipov kostja at tarantool.org
Wed May 15 05:02:57 MSK 2019


* Vladislav Shpilevoy <v.shpilevoy at tarantool.org> [19/05/15 04:21]:
> SWIM internally tries to avoid unnecessary close+socket+bind
> calls on reconfiguration if a new URI is the same as an old one.
> SWIM transport compares <IP, port> couples and if they are
> equal, does nothing.
> 
> But if a port is 0, it is not a real port, but a sign to the
> kernel to find any free port on the IP address. In such a case
> SWIM transport after bind() retrieves and saves a real port.
> 
> When the same URI is specified again, the transport compares two
> addresses: old <IP, auto found port>, new <IP, 0>, sees they are
> 'different', and rebinds. It is not necessary, obviously, because
> the new URI covers the old one.
> 
> This commit avoids rebind, when new IP == old IP, and new port is
> 0.

ok to push


-- 
Konstantin Osipov, Moscow, Russia, +7 903 626 22 32




More information about the Tarantool-patches mailing list