-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hardening automatic context propagation #3549
Merged
Merged
Changes from 22 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
5bb38a7
Hardening automatic context propagation
chemicL 6c5a500
Cleared tests from previously removed code
chemicL 75bd4d0
ParallelFlux impl, wrapping Publishers instead of Subscribers only
chemicL 8cbeb28
spotless
chemicL f50ff50
FluxSubscribeOnValue marked as internal
chemicL 9a9bb89
Sinks
chemicL 2f8a5ac
cleaning up and unifying fuseable vs non-fuseable context restoring i…
chemicL 6bebd69
mono fuseable variant
chemicL 1c1f299
Removed unnecessary fuseable classes
chemicL 031f550
Added Mono.create tests
chemicL 9a17e3a
delayUntil and sinks support
chemicL 772c5fd
Support for repeatWhen, retryWhen, subscribeOnCallable, switchOnFirst…
chemicL 9350f8c
SourceProducer opeartors support (first batch)
chemicL 898e0eb
Remaining source producer wrappings
chemicL 1b15611
Cleanup
chemicL c7243fb
Replaced unnecessary completion stage handling with Subscriber wrapping
chemicL 479f0c0
Cleanup
chemicL 6f61641
Further cleanup
chemicL 0ef68d7
Removed comment
chemicL 9d6afb4
Internal Attr for INTERNAL_PRODUCER
chemicL 95e776d
Refactoring tests
chemicL 5b3dfbf
Delivering completion signals on another thread
chemicL b27c77b
Revert ParallelArraySource Operators.toFluxOrMono
chemicL 2c452ee
reverted hooks tests changes
chemicL 88ce2c6
Merge branch 'main' into non-core-flux-and-mono
chemicL 39b699a
new method excludes for japicmp
chemicL a203598
from(ParallelFlux) is package private
chemicL File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the minor outcome is that super scan will go through the same attr one more time (hey, potential small perf penalty). So... may be it worth just adding attr explicitly as it was before
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actually, the individual implementations should not duplicate what the parent does, just enhancements and changes should be reported.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That is for common cases. Here, in low-level library, that was likely done performance wise. Even it was not important before, now we would have to be sure that by doing common OOP stuff we don't impact performance on the hot path (since now that code is part of the hot path and any redundancy will add significant impact at scale).
Such thing may invisible for latency of a single request, but at scale, especially in the case when just few Netty threads are doing all the work such small Impact in 0,00001% will have %1 overall perf degradation for 100_000 queued requests which would have to be served by the same number of threads. Thus such unthoughtful change may impact someones production.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The reasoning you give assumes that 1 thread is handling the queue. If you keep maintaining the queue filled at 100k pending requests constantly it means you're in much bigger trouble. To put things into perspective assume mean time to handle a request is 1ms. That means you'd wait 100s for a request to start being processed. That 0,00001% impact, or 1% overall impact is honestly meaningless to you at that point. Your request is already waiting for 1 minute 40 seconds. It doesn't matter you'd wait an additional second, having the end result being 1 minute 41 seconds.
Putting that discussion aside, as you suggest, I will see whether inlining kicks in, as I'd expect it should with such short methods, but if this is a tricky situation to the JIT, we'll see that in JMH tests, which I'm also going to perform.