#7323·redisson

Cancelled connection-pool acquisitions mark healthy replicas as failed

Author: rahulrane50Created Aug 24, 2026Updated Sep 9, 2026

Redis version

Valkey 7.x

Redisson version

redisson 3.52.0

Redisson configuration

N/A

What is the Expected behavior?

CancellationException caused by caller cancellation, pool pressure, or acquisition timeout should not count as a Redis connection failure. Only genuine connection-establishment or connection-health failures should affect failed-node detection.

What is the Actual behavior?

Repeated cancelled acquisitions start the failed-node timer and can eventually cause a healthy replica to be reported as failed.

Additional information

Bug Description

Redisson reports cancelled connection-pool acquisitions as Redis connection failures to FailedConnectionDetector. RedisExecutor uses CancellationException when an operation is cancelled or connection acquisition times out. ConnectionPool.acquireConnection() currently forwards every exceptional replica acquisition to FailedNodeDetector. After the default 180-second detection interval, a healthy replica can be marked as failed, removed from selection, and unnecessarily shut down and reconnected.

Impact

Healthy replicas may be unnecessarily excluded from read traffic during sustained pool pressure or cancellation-heavy workloads.

Relevant Code Path

  • RedisExecutor completes connection acquisition with CancellationException.
  • ConnectionPool.acquireConnection() reports all exceptional acquisitions to FailedNodeDetector.
  • FailedConnectionDetector marks the node failed after checkInterval.

Proposed Fix

Ignore CancellationException in the failed-node detection path while preserving detection for genuine connection failures.