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
fix(crons): Fix connection spikes during partition assignment (#70585)
`on_partitions_assigned` is called whenever partitions are assigned to a
consumer. This calls `_create_strategy`, which calls
`create_with_partitions`.
Since we create the `ThreadPoolExecutor` in `create_parallel_worker`,
this means we create a new threadpool whenever we partition assignment
changes. The reason this causes spikes and isn't sustained is that
presumably the previous `ProcessingStrategy` stops being used and ends
up garbage collected, which results in the `ThreadPoolExecutor` being
garbage collected too.
0 commit comments