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

Blocking improvements max-concurrency #2219

Merged
merged 1 commit into from
Jul 11, 2023

Conversation

ozangunalp
Copy link
Collaborator

@ozangunalp ozangunalp commented Jul 10, 2023

Draft PR for discussions

Currently, Reactive Messaging controls the @Blocking method max concurrency level using the pool size attribute of the vertx worker pool created for the blocking execution.

However, there is a second aspect that affects the max concurrency which is the mutiny concurrency level when merging multiple Uni's into a Multi: https://smallrye.io/smallrye-mutiny/2.3.1/tutorials/transforming-items-asynchronously/#transforming-items-from-multi-the-merge-vs-concatenate-dilemma

This last control how many items will be requested upstream in parallel and effective only when blocking with ordered=false.

This PR changes how the Mutiny merge concurrency is configured :

  • When available the max-concurrency is used to configure the Mutiny merge concurrency.
  • If not it falls back to the current default value of Queues.BUFFER_S.

@ozangunalp
Copy link
Collaborator Author

Fixes #2198 and related to #2196

@codecov-commenter
Copy link

codecov-commenter commented Jul 10, 2023

Codecov Report

Merging #2219 (4272ee0) into main (8fcdb37) will decrease coverage by 0.01%.
The diff coverage is 100.00%.

❗ Current head 4272ee0 differs from pull request most recent head d02a5a5. Consider uploading reports for the commit d02a5a5 to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #2219      +/-   ##
============================================
- Coverage     77.72%   77.72%   -0.01%     
- Complexity     3695     3737      +42     
============================================
  Files           301      311      +10     
  Lines         12307    12458     +151     
  Branches       1570     1580      +10     
============================================
+ Hits           9566     9683     +117     
- Misses         2024     2053      +29     
- Partials        717      722       +5     
Impacted Files Coverage Δ
...aging/providers/connectors/WorkerPoolRegistry.java 88.73% <ø> (ø)
...reactive/messaging/providers/AbstractMediator.java 82.72% <100.00%> (+0.48%) ⬆️
...eactive/messaging/providers/ProcessorMediator.java 93.14% <100.00%> (+0.05%) ⬆️
...eactive/messaging/providers/PublisherMediator.java 81.05% <100.00%> (ø)
...active/messaging/providers/SubscriberMediator.java 83.55% <100.00%> (+0.10%) ⬆️
...messaging/providers/extension/MediatorManager.java 84.53% <100.00%> (+1.58%) ⬆️

... and 19 files with indirect coverage changes

@ozangunalp
Copy link
Collaborator Author

@cescoffier simplified this PR to use max-concurrency value as mutiny merge concurrency.

@ozangunalp ozangunalp marked this pull request as ready for review July 11, 2023 13:31
@ozangunalp ozangunalp added this to the 4.8.0 milestone Jul 11, 2023
@cescoffier cescoffier merged commit 9c98765 into smallrye:main Jul 11, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants