Skip to content

Fix: Spring 7 Webflux NoSuchElementError on HttpHeaders#entrySet() - #4556

Open
mtomik wants to merge 6 commits into
elastic:mainfrom
mtomik:fix/webflux-spring-7-support
Open

Fix: Spring 7 Webflux NoSuchElementError on HttpHeaders#entrySet() #4556
mtomik wants to merge 6 commits into
elastic:mainfrom
mtomik:fix/webflux-spring-7-support

Conversation

@mtomik

@mtomik mtomik commented Aug 21, 2026

Copy link
Copy Markdown

What does this PR do?

Since the original PR is stuck for some time,
I created another one with the same commits + a bit better solution for the core of this issue.

Also when I was running these newer tests I found one more issue:

Spring7ServerFunctionalInstrumentationTest#dispatchError test was failing due to TracedSubscriber not removing the reference of the subscription on cancel() from contextMap. so the solution might be the CancellationAwareSubscription that is just the wrapper calling the discardIf() after cancel.

Is it possible that the issue was there even with older versions of reactor (from older Spring version), but now in that Spring 7 ( reactor 3.8.6 ) it was always failing.

Checklist

  • This is an enhancement of existing features, or a new feature in existing plugins
    • I have updated CHANGELOG.next-release.md
    • I have added tests that prove my fix is effective or that my feature works
    • Added an API method or config option? Document in which version this will be introduced
    • I have made corresponding changes to the documentation
  • This is a bugfix
  • This is a new plugin
    • I have updated CHANGELOG.next-release.md
    • My code follows the style guidelines of this project
    • I have made corresponding changes to the documentation
    • I have added tests that prove my fix is effective or that my feature works
    • New and existing unit tests pass locally with my changes
    • I have updated supported-technologies.md
    • Added an API method or config option? Document in which version this will be introduced
    • Added an instrumentation plugin? Describe how you made sure that old, non-supported versions are not instrumented by accident.
  • This is something else

@mtomik
mtomik requested a review from a team as a code owner August 21, 2026 12:19
@cla-checker-service

cla-checker-service Bot commented Aug 21, 2026

Copy link
Copy Markdown

💚 CLA has been signed

@github-actions

Copy link
Copy Markdown

🤖 GitHub comments

Just comment with:

  • run docs-build : Re-trigger the docs validation. (use unformatted text in the comment!)

@github-actions github-actions Bot added agent-java community Issues and PRs created by the community triage labels Aug 21, 2026
@mtomik mtomik changed the title Fix/webflux spring 7 support Fix: Spring 7 Webflux NoSuchElementError on HttpHeaders#entrySet() Aug 21, 2026
@mtomik
mtomik force-pushed the fix/webflux-spring-7-support branch from 09b0d62 to 4fb8061 Compare August 21, 2026 12:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-java community Issues and PRs created by the community triage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants