Skip to content

cache: fix cyclic ABSL_ACQUIRED_BEFORE annotations in CacheEvictionThread#46043

Merged
jwendell merged 1 commit into
envoyproxy:mainfrom
jwendell:fix-cyclic-acquired-before
Jul 9, 2026
Merged

cache: fix cyclic ABSL_ACQUIRED_BEFORE annotations in CacheEvictionThread#46043
jwendell merged 1 commit into
envoyproxy:mainfrom
jwendell:fix-cyclic-acquired-before

Conversation

@jwendell

@jwendell jwendell commented Jul 8, 2026

Copy link
Copy Markdown
Member

The two mutexes mu_ and cache_mu_ are never held simultaneously, so no lock ordering annotation is needed. The previous circular ACQUIRED_BEFORE hack (each pointing to the other) is rejected by clang 22's improved -Wthread-safety-analysis.

Remove the ordering annotations; the GUARDED_BY annotations on the protected fields remain and are sufficient.

…read

The two mutexes mu_ and cache_mu_ are never held simultaneously, so
no lock ordering annotation is needed. The previous circular
ACQUIRED_BEFORE hack (each pointing to the other) is rejected by
clang 22's improved -Wthread-safety-analysis.

Remove the ordering annotations; the GUARDED_BY annotations on the
protected fields remain and are sufficient.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Signed-off-by: Jonh Wendell <jwendell@redhat.com>
@jwendell jwendell requested a review from ggreenway as a code owner July 8, 2026 12:44
@jwendell jwendell enabled auto-merge (squash) July 8, 2026 13:07

@ravenblackx ravenblackx left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks. Shame there's still no "not acquired together" annotation.

@jwendell jwendell merged commit a2f0b1b into envoyproxy:main Jul 9, 2026
28 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.

2 participants