Description
Backward node connection checking looks wierd. What we might improve are:
1) Addresses checking could be done in parrallel, not sequentially.
for (InetSocketAddress addr : nodeAddrs) { // Connection refused may be got if node doesn't listen // (or blocked by firewall, but anyway assume it is dead). if (!isConnectionRefused(addr)) { liveAddr = addr; break; } }
2) Any io-exception should be considered as failed connection, not only connection-refused:
catch (ConnectException e) { return true; } catch (IOException e) { return false; }
3) Timeout on connection checking should not be constant or hardcode:
sock.connect(addr, 100);
4) Decision to check connection should rely on configured exchange timeout, no on the ping interval
// We got message from previous in less than double connection check interval. boolean ok = rcvdTime + U.millisToNanos(connCheckInterval) * 2 >= now;
Attachments
Issue Links
- causes
-
IGNITE-13111 Simplify backward checking of node connection.
- Closed
- depends upon
-
IGNITE-13012 Fix failure detection timeout. Simplify node ping routine.
- Resolved
- incorporates
-
IGNITE-13017 Remove hardcoded delay from re-marking failed node as alive.
- Resolved
- is depended upon by
-
IGNITE-13014 Remove double checking of node availability.
- Closed
- links to