-
Notifications
You must be signed in to change notification settings - Fork 129
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 the concatMap operator #1489
Conversation
@ozangunalp How does this sound against the |
implementation/src/main/java/io/smallrye/mutiny/operators/multi/MultiConcatMapOp.java
Outdated
Show resolved
Hide resolved
implementation/src/main/java/io/smallrye/mutiny/operators/multi/MultiConcatMapOp.java
Outdated
Show resolved
Hide resolved
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #1489 +/- ##
============================================
+ Coverage 89.23% 89.34% +0.10%
- Complexity 3362 3365 +3
============================================
Files 459 459
Lines 13405 13434 +29
Branches 1642 1635 -7
============================================
+ Hits 11962 12002 +40
- Misses 805 808 +3
+ Partials 638 624 -14
|
@jponge Reactive Messaging tests are green 🥇 |
implementation/src/main/java/io/smallrye/mutiny/operators/multi/MultiConcatMapOp.java
Show resolved
Hide resolved
It seems all correct to me. |
Thanks Ozan! Yes some updates can be done in a CAS, but in some cases you need to read the current state but update depending on some other condition (e.g., is there any outstanding demand or not), which IMHO can't be expressed as a CAS. |
Exactly that! |
In this implementation the operator acts as a simple no-queue forwarder between the subscriber and the current upstream. There is also a small dose of fine-grained locking around a few state machine updates that can’t be expressed as non-blocking / compare & swap operations.
74615cb
to
dded2d6
Compare
@ozangunalp May I ask you one more run? (I did a few edits, nothing that should break, but those are always famous last words) |
I've checked again. Reactive messaging tests in local are green. |
didn't notice anything weird. |
... "Yet" 🤣 |
In this implementation the operator acts as a simple no-queue forwarder
between the subscriber and the current upstream.
There is also a small dose of fine-grained locking around a few
state machine updates that can’t be expressed as non-blocking / compare & swap
operations.