Skip to content

Commit 83e6de7

Browse files
committed
1
1 parent 2529fdf commit 83e6de7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

cassandra/policies.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1045,8 +1045,9 @@ class LimitedConcurrencyShardConnectionBackoffPolicy(ShardConnectionBackoffPolic
10451045
For backoff calculation, it requires either a `cassandra.policies.ShardConnectionBackoffSchedule` or
10461046
a `cassandra.policies.ReconnectionPolicy`, as both expose the same API.
10471047
1048-
The backoff schedule is initiated when the first request for a given `host_id` is received.
1049-
If there are no remaining requests for that `host_id`, the schedule is reset.
1048+
It spawns threads when there are pending requests, maximum number of threads is `max_concurrent` multiplied by nodes in the cluster.
1049+
When thread is spawn it initiates backoff schedule, which is local for this thread.
1050+
If there are no remaining requests for that `host_id`, thread is killed.
10501051
10511052
This policy also prevents multiple pending or scheduled connections for the same (host, shard) pair;
10521053
any duplicate attempts to schedule a connection are silently ignored.

0 commit comments

Comments
 (0)