Skip to content

Enforce entity by connection limit more strictly #464

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

Closed
acogoluegnes opened this issue Dec 1, 2023 · 0 comments · Fixed by #486
Closed

Enforce entity by connection limit more strictly #464

acogoluegnes opened this issue Dec 1, 2023 · 0 comments · Fixed by #486
Milestone

Comments

@acogoluegnes
Copy link
Contributor

When creating producers/consumers at the same time in different threads, the coordinators may not be able to enforce the limit per connection. We then end up with 1 producer/consumer per connection.

One way to mitigate the issue is to create the entities synchronously or to sleep a few milliseconds between multi-threaded creations.

Way to reproduce: set 3 for the limit per connection, loop up to 9, create a consumer with an Executor. There should be 9 connections for the consumers (tested only with consumers).

Note adding too much synchronization can lead to deadlocks on recovery.

acogoluegnes added a commit that referenced this issue Dec 1, 2023
In case of too many concurrent creations.

References #464
github-actions bot pushed a commit that referenced this issue Dec 1, 2023
In case of too many concurrent creations.

References #464
acogoluegnes added a commit that referenced this issue Jan 2, 2024
Lock producer and consumer creation in respective coordinator.
This adds some contention but should be acceptable
as creations are not hot and concurrent operations.

Fixes #464
@acogoluegnes acogoluegnes added this to the 0.16.0 milestone Jan 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant