Skip to content
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

fix bulkhead in case multiple kinds are used at the same time #1095

Merged
merged 1 commit into from
Dec 10, 2024

Conversation

Ladicek
Copy link
Contributor

@Ladicek Ladicek commented Dec 10, 2024

The bulkhead implementation for the synchronous case didn't acquire the capacity semaphore, it only used the work semaphore. This is wrong in case multiple kinds of the bulkhead are used at the same time, where the bulkhead might already be full due to synchronous invocations, but an asynchronous invocation could still be accepted into the bulkhead because the capacity semaphore is not in the right state.

This commit fixes that by changing the synchronous implementation to also use the capacity semaphore, in addition to the usage of the work semaphore.

The bulkhead implementation for the synchronous case didn't acquire the capacity
semaphore, it only used the work semaphore. This is wrong in case multiple kinds
of the bulkhead are used at the same time, where the bulkhead might already be
full due to synchronous invocations, but an asynchronous invocation could still
be accepted into the bulkhead because the capacity semaphore is not in the right
state.

This commit fixes that by changing the synchronous implementation to also use
the capacity semaphore, in addition to the usage of the work semaphore.
@Ladicek Ladicek added this to the 6.7.1 milestone Dec 10, 2024
@Ladicek Ladicek merged commit 9d316f4 into smallrye:main Dec 10, 2024
16 checks passed
@Ladicek Ladicek deleted the fix-bulkhead branch December 10, 2024 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant