-
Notifications
You must be signed in to change notification settings - Fork 48
Add shard-aware reconnection policies with support for scheduling constraints #473
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Add shard-aware reconnection policies with support for scheduling constraints #473
Conversation
0b80886
to
f62dfa3
Compare
dbb3ad1
to
cbb4719
Compare
Shouldn't we have some warning / info level log when backoff is taking place? |
I would rather not do it, it is not useful and can potentially pollute the log |
Do you know what caused the test failure?
it is a unit test that at the first glance should be fully deterministic. Failure is unexpected. |
It is known issue, conversion goes wrong somewhere |
a43ccd1
to
b0fd069
Compare
Add abstract classes: `ShardReconnectionPolicy` and `ShardReconnectionScheduler` And implementations: `NoDelayShardReconnectionPolicy` - policy that represents old behavior of having no delay and no concurrency restriction. `NoConcurrentShardReconnectionPolicy` - policy that limits concurrent reconnections to 1 per scope and introduces delay between reconnections within the scope.
Inject shard reconnection policy into cluster, session, connection and host pool Drop pending connections tracking logic, since policy does that. Fix some tests that mocks Cluster, session, connection or host pool.
b0fd069
to
f47313f
Compare
Introduce
ShardReconnectionPolicy
and its implementations:NoDelayShardReconnectionPolicy
: avoids reconnection delay and ensures at most one reconnection per host+shard.NoConcurrentShardReconnectionPolicy
: limits concurrent reconnections to 1 per scope (Cluster or Host) using a backoff policy.This feature enables finer control over shard reconnection behavior, helping prevent reconnection storms.
Fixes: #483
Pre-review checklist
./docs/source/
.Fixes:
annotations to PR description.