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
Enabled Automatic Context Propagation and context propagation with lift causes ClassCastException #3762
Comments
Thank you for the report. I can confirm this is a bug. I will investigate. |
As a matter of fact, Automatic Context Propagation is not the root cause here.
Here is a more simplified reproducer demonstrating the issue with no automatic context propagation.
Let me try to work with that. |
I dug a bit deeper. Two things:
The reason for it is that |
One more issue is that |
I created a PR to address the multitude of problems that led to this report. @kz-dt I have a question. The answers won't influence the fix that is needed with no doubt. However, I wonder why you combine automatic context propagation with |
Hi @chemicL, Thank you for looking into the issue. A customer uses both automatic context propagation and separate solution which injects java agent and setups |
@kz-dt thanks for sharing. I think I managed to resolve the possible issues. Please validate with the latest |
Expected Behavior
No exceptions are thrown
Actual Behavior
An exception is thrown:
Steps to Reproduce
Reproducer is here: https://github.com/kz-dt/reactor_class_cast_exception_reproducer
Possible Solution
It looks like Operators.lift returns wrong subscriber type. Calling
Hooks.onOperatorDebug();
"fixes" the issue since it adds another wrapper.Your Environment
reactor-core 3.6.+
micrometer jar should be in classpath
The issue originally was discovered with SpringBoot 3.2+ and couchbase java client 3.4.11, the dependencies were the following:
org.springframework.boot:spring-boot-starter-webflux:3.2.0
org.springframework.boot:spring-boot-starter-data-couchbase-reactive:3.2.0
netty
, ...): micrometer-tracing:1.2.1java -version
):openjdk version "11.0.20.1" 2023-08-24
OpenJDK Runtime Environment Temurin-11.0.20.1+1 (build 11.0.20.1+1)
OpenJDK 64-Bit Server VM Temurin-11.0.20.1+1 (build 11.0.20.1+1, mixed mode)
uname -a
): MINGW64_NT-10.0-22631 DT-3Q41FY3 3.4.7-25de8b84.x86_64 2023-08-28 21:32 UTC x86_64 MsysThe text was updated successfully, but these errors were encountered: