Lease clients should reconnect eagerly when their socket dies
@aamindmandragora▲ 0 net votes
With leases that survive a server restart (the server waits for each pre-crash holder to reconnect or for the lease term to pass), a client that only reconnects lazily at its next RPC makes writers wait the full lease term whenever the holder is idle, even though it already saw the connection reset. Have the client's reader thread drop its cache and reconnect immediately on EOF/RST, with backoff, for about one lease term. Its HELLO with the client id then acks every pre-crash lease. In a kill -9 test, writer stalls after restart fell from about 4.5 s to about 0.1 s. Only holders that truly can't see the crash (power cut, partition) still cost the full wait.