-
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
Propagate ThreadLocals for non-Reactor upstream sources #3418
Conversation
Factory methods for creating `Flux` and `Mono` from non-Reactor sources now restore `ThreadLocal` values when `Hooks.enableAutomaticContextPropagation()` was called in the following cases: * Flux.from(Publisher) * Mono.from(Publisher) * Mono.fromDirect(Publisher) * Mono.fromFuture(CompletableFuture) * Mono.fromCompletionStage(CompletionStage) and relevant overrides. Fixes #3366.
Fuseable, | ||
QueueSubscription<T>, |
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.
Note, MonoCompletionStage
also has Fuseable
removed. They are not needed, as the fusion support is NONE
. And it makes the subscriber wrapping to the restoring subscriber possible (it is not Fuseable
).
Verified against the reproducer provided in spring-projects/spring-boot#34374 - trace info is present with this branch. |
Factory methods for creating
Flux
andMono
from non-Reactor sources now restoreThreadLocal
values whenHooks.enableAutomaticContextPropagation()
was called in the following cases:Flux.from(Publisher)
Mono.from(Publisher)
Mono.fromDirect(Publisher)
Mono.fromFuture(CompletableFuture)
Mono.fromCompletionStage(CompletionStage)
and relevant overloads.
Fixes #3366.