Skip to content

Conversation

@pema4
Copy link
Contributor

@pema4 pema4 commented Sep 16, 2025

Removed scope.close call from a future completion callback

Added new test case ObservedAspectTests#observationShouldNotLeakToFutureCompletionThread

Closes #6727

@pema4 pema4 changed the title Fix scope leak in ObservedAspect. Fix scope leak in ObservedAspect Sep 16, 2025
@pema4 pema4 force-pushed the observed-aspect-leak branch from a119a2c to 803af48 Compare September 16, 2025 20:58
Copy link
Member

@shakuzen shakuzen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for the pull request with the test. I probably need to take a closer look at things still, but is there a reason the pull request is still marked as a draft?

@pema4 pema4 force-pushed the observed-aspect-leak branch from 845b5c6 to 7eb9f94 Compare October 12, 2025 12:57
@pema4 pema4 marked this pull request as ready for review October 12, 2025 12:59
Remove 'scope.close' call from the future completion thread
Add new test case ObservedAspectTests#parentObservationScopeShouldNotLeakToFutureCompletionThread

Signed-off-by: pema4 <[email protected]>
@jonatan-ivanov jonatan-ivanov changed the base branch from main to 1.14.x October 13, 2025 19:45
@jonatan-ivanov
Copy link
Member

Thank you for the PR!
I polished the tests a bit and rebased it on top of 1.14.x so that older versions will get the fix too.

@jonatan-ivanov jonatan-ivanov merged commit bae31eb into micrometer-metrics:1.14.x Oct 13, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Scope closed on wrong thread in ObservedAspect with CompletionStage return type

3 participants