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: rewrite of the concatenation operators #1448

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

jponge
Copy link
Member

@jponge jponge commented Nov 30, 2023

This fixes race conditions in concatMap and stream concatenation operators.

Refs: #1388

This fixes race conditions in concatMap and stream concatenation operators.

Refs: #1388
@jponge
Copy link
Member Author

jponge commented Nov 30, 2023

Status: awaiting further tests

@jponge jponge requested a review from cescoffier November 30, 2023 15:45
@jponge
Copy link
Member Author

jponge commented Nov 30, 2023

/cc @ozangunalp for some reason you're not part of this org / repo but I'd like your review when you have some bandwidth 😃

Copy link

codecov bot commented Nov 30, 2023

Codecov Report

Merging #1448 (b552fc4) into main (1a42ef8) will decrease coverage by 0.01%.
Report is 1 commits behind head on main.
The diff coverage is 78.86%.

Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main    #1448      +/-   ##
============================================
- Coverage     89.27%   89.27%   -0.01%     
- Complexity     3363     3366       +3     
============================================
  Files           459      459              
  Lines         13454    13403      -51     
  Branches       1655     1641      -14     
============================================
- Hits          12011    11965      -46     
+ Misses          802      801       -1     
+ Partials        641      637       -4     
Files Coverage Δ
...smallrye/mutiny/operators/multi/MultiConcatOp.java 91.30% <100.00%> (+10.12%) ⬆️
...java/io/smallrye/mutiny/helpers/Subscriptions.java 77.65% <42.85%> (-3.56%) ⬇️
...llrye/mutiny/operators/multi/MultiConcatMapOp.java 80.62% <79.43%> (+0.62%) ⬆️

... and 10 files with indirect coverage changes

@cescoffier cescoffier merged commit 83c8785 into main Nov 30, 2023
6 of 7 checks passed
@cescoffier cescoffier deleted the bug/concatenation-rewrites branch November 30, 2023 17:59
Copy link
Collaborator

@ozangunalp ozangunalp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks great! Just a minor comment.

if (UPSTREAM_UPDATER.compareAndSet(this, null, s)) {
public void onSubscribe(Subscription subscription) {
if (UPSTREAM_UPDATER.compareAndSet(this, null, subscription)) {
upstream = subscription;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Normally you don't need this line, atomic updater sets the field

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes,, good catch!

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.

Uni.onFailure().withBackoff().retry() occasionally stalls
3 participants