feat: introduce lenient maxConcurrency for flatMap#2031
feat: introduce lenient maxConcurrency for flatMap#2031ozangunalp wants to merge 1 commit intosmallrye:mainfrom
Conversation
Replenish upstream at inner stream completion even though we hit the concurrency limit
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2031 +/- ##
============================================
- Coverage 89.18% 89.00% -0.19%
+ Complexity 3120 3114 -6
============================================
Files 412 412
Lines 13295 13304 +9
Branches 1688 1690 +2
============================================
- Hits 11857 11841 -16
- Misses 812 825 +13
- Partials 626 638 +12
🚀 New features to boost your workflow:
|
|
For better coverage some tests need to be duplicated for the lenient concurrency branch |
|
I'm not worried about test coverage here |
|
Hi @ozangunalp, getting back to this, what's your take on this PR? Also should more tests be added? |
|
Yes, next is to add more test to check that requests doesn't blow up in normal cases. I'll get back to this tomorrow. |
|
@jponge, I reviewed why I need this in smallrye/smallrye-reactive-messaging#3208 I think I can get around this by cancelling/completing the merged group with an idleness timeout: If the group doesn't receive any more items within the timeout, it can cancel the upstream and complete the group to free up a merge slot in flatMap and remove the groupedMulti from groupBy. Later if another item is produced upstream for the same key, it'll re-create the group. I'll ping you on the PR for you take a look. So I think we can close this one. |
|
Thanks @ozangunalp for looking into this! I'll close this one, and happy to have a look on |
Replenish upstream at inner stream completion even though we hit the concurrency limit