Skip to content

test: fix flaky TestServer_MetricsViewRows_RowFilterCache - #10035

Merged
k-anshul merged 1 commit into
mainfrom
k-anshul/fix-flaky-row-filter-cache-test
Oct 19, 2026
Merged

k-anshul merged 1 commit into
mainfrom
k-anshul/fix-flaky-row-filter-cache-test

Conversation

@k-anshul

Copy link
Copy Markdown
Member
  • Ristretto writes are async: a miss while polling re-runs the query and overwrites the cached object, so cached == res never holds.
  • Confirm a cache hit by two consecutive queries returning the same object instead.
  • Repro on main: 52/100 failures with -count=100 -cpu 1; 0/100 with the fix. Still fails when SecurityClaims is dropped from the cache key.

Follow-up to #10026.

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Developed in collaboration with Claude Code

A cache miss while polling can overwrite the cached object,
so comparing against the first response never succeeds.
Confirm cache hits by two consecutive queries returning the same object.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@k-anshul k-anshul self-assigned this Oct 19, 2026
@k-anshul
k-anshul requested a review from pjain1 October 19, 2026 09:37
@k-anshul
k-anshul merged commit 9584fb8 into main Oct 19, 2026
16 checks passed
@k-anshul
k-anshul deleted the k-anshul/fix-flaky-row-filter-cache-test branch October 19, 2026 10:07
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