You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
PR #1024 makes heartbeat returns stop re-arming a finite control-connection reconnection schedule once that schedule is exhausted for the same defunct connection.
The guard remains until a successful connection is installed. This is consistent with the public ReconnectionPolicy contract: a finite iterable means reconnection attempts cease after exhaustion.
This should return a finite or infinite iterable of delays (each as a
floating point number of seconds) in-between each failed reconnection
attempt. Note that if the iterable is finite, reconnection attempts
will cease once the iterable is exhausted.
The operational result is terminal automatic recovery for that failed control connection after finite exhaustion. Later heartbeat returns cannot start another recovery attempt.
log.debug("[control connection] Reconnection schedule is "
"exhausted for the defunct connection")
return
self.reconnect()
Scope
This differs from #1029. That issue covers recovery latency while an infinite or still-active handler is backing off. This issue covers the state after a finite handler has stopped.
Design constraints
Silently restarting after a cooldown turns max_attempts=N into unlimited batches of N attempts.
A custom policy exposes an arbitrary iterable, so the driver cannot derive a universal maximum policy delay.
The default infinite reconnection policy is unaffected by finite exhaustion.
Expected outcome
Define the control-connection recovery contract after finite schedule exhaustion. If automatic recovery should resume, expose that behavior explicitly through policy or configuration semantics rather than implicitly redefining every finite schedule.
Acceptance criteria
Terminal versus periodic recovery is chosen and documented.
Built-in and custom finite policies have deterministic behavior.
Periodic recovery, if supported, does not reset active backoff or create one attempt per heartbeat.
Unit tests cover exhaustion, repeated heartbeat returns, successful recovery, and shutdown.
Operator-facing documentation explains how to select terminal or continuing recovery.
Problem
PR #1024 makes heartbeat returns stop re-arming a finite control-connection reconnection schedule once that schedule is exhausted for the same defunct connection.
python-driver/cassandra/cluster.py
Lines 4119 to 4124 in 72db15c
The guard remains until a successful connection is installed. This is consistent with the public
ReconnectionPolicycontract: a finite iterable means reconnection attempts cease after exhaustion.python-driver/cassandra/policies.py
Lines 873 to 878 in 72db15c
The operational result is terminal automatic recovery for that failed control connection after finite exhaustion. Later heartbeat returns cannot start another recovery attempt.
python-driver/cassandra/cluster.py
Lines 5358 to 5365 in 72db15c
Scope
This differs from #1029. That issue covers recovery latency while an infinite or still-active handler is backing off. This issue covers the state after a finite handler has stopped.
Design constraints
max_attempts=Ninto unlimited batches of N attempts.Expected outcome
Define the control-connection recovery contract after finite schedule exhaustion. If automatic recovery should resume, expose that behavior explicitly through policy or configuration semantics rather than implicitly redefining every finite schedule.
Acceptance criteria
Related
idle_heartbeat_intervaltomax_reconnection_delay#1029 tracks active-handler recovery latency.