Skip to content

Avoid logging expected cache cancellation - #1953

Merged
BoykoAlex merged 1 commit into
spring-projects:mainfrom
ziplla:fix/gh-1777-cache-cancellation
Jul 31, 2026
Merged

BoykoAlex merged 1 commit into
spring-projects:mainfrom
ziplla:fix/gh-1777-cache-cancellation

Conversation

@ziplla

@ziplla ziplla commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

Fixes #1777

Intentional compilation-unit cache invalidation cancels its cached future. The dependent completion stage receives that cancellation wrapped in a CompletionException, so the existing direct cancellation check logs an expected event as an error.

This change unwraps only CompletionException before applying the existing cancellation check. Other exceptional completions continue to be logged. Focused tests cover both wrapped cancellation and a wrapped real failure.

Validation: the repository Check Pull Request workflow passed on Linux, Windows, and macOS.

Unwrap completion exceptions before classifying cancellation while preserving error logging for all other failures.

Fixes spring-projectsgh-1777

Signed-off-by: Pavel Zaitsev <[email protected]>
@BoykoAlex
BoykoAlex merged commit d73050c into spring-projects:main Jul 31, 2026
1 check passed
@BoykoAlex

Copy link
Copy Markdown
Contributor

Thank you!

@martinlippert martinlippert added this to the 5.4.0.RELEASE milestone Jul 31, 2026
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.

exception thrown around internal compilation unit cache

3 participants