mirror of
https://github.com/rustfs/rustfs.git
synced 2026-07-28 00:58:59 +00:00
e0f04f4621
fix(ecstore): only evict remote lock channel on transport failures (#4567) The remote lock RPC path evicted the cached gRPC channel on *any* `tonic::Status`. Genuine transport failures (connect refused/reset, keepalive/deadline) surface that way, but so do server-produced application statuses on a perfectly healthy channel: `Unauthenticated` /`PermissionDenied` from the signature interceptor, `Internal` /`FailedPrecondition` when the peer lock service is not ready yet, `InvalidArgument`, `ResourceExhausted`, `Unimplemented`, and so on. Evicting the channel for those cannot help — the channel is fine — and each spurious eviction re-dials the connection and advances the peer toward the offline threshold via `record_peer_unreachable`, producing background channel churn on an otherwise healthy cluster. Classify the tonic status with `is_transport_failure` (underlying transport source present, or one of `Unavailable`/`DeadlineExceeded` /`Unknown`/`Cancelled`) and only evict the cached channel when it is a real transport failure. The client-side timeout arm still evicts. This mirrors the transport-vs-application distinction already used on the remote-disk RPC path.