Skip to content

Flush cache by bank_id - #16447

Merged
roryharr merged 1 commit into
anza-xyz:masterfrom
roryharr:cache_lookups_by_bank_id
Oct 28, 2026
Merged

roryharr merged 1 commit into
anza-xyz:masterfrom
roryharr:cache_lookups_by_bank_id

Conversation

@roryharr

@roryharr roryharr commented Oct 27, 2026 •

Copy link
Copy Markdown

Problem

Flushing the cache by slot requires the bank_ids structure which needs to be removed to support multiple banks with the same slot.

One note: in the flush flow, bank_id is only used to access the write cache. Everywhere else uses slots, since the purpose of the function is to flush to storages which are keyed by slot

Summary of Changes

  • Since unflushed_roots has both bank_id, and slot anyways, just return both bank_id and slot
  • The returned list is still limited by slot, but bank_id is also retained now.
  • Flush can now remove entries from the write_cache by bank_id and remove_slot is removed.

Testing

  • CI

Fixes #

@roryharr
roryharr force-pushed the cache_lookups_by_bank_id branch from 5448a79 to db22158 Compare October 27, 2026 17:45
@codecov-commenter

codecov-commenter commented Oct 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 82.4%. Comparing base (f51751c) to head (8b26ba8).
⚠️ Report is 2 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##           master   #16447     +/-   ##
=========================================
+ Coverage    82.3%    82.4%   +0.1%     
=========================================
  Files         954      954             
  Lines      373619   373616      -3     
=========================================
+ Hits       307676   308061    +385     
+ Misses      65943    65555    -388     
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roryharr
roryharr force-pushed the cache_lookups_by_bank_id branch from db22158 to acac655 Compare October 27, 2026 19:58
roots_to_flush returns each unflushed root's bank id with its slot, and flush
finds and removes each root's cache by its bank id. This removes remove_slot.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@roryharr
roryharr force-pushed the cache_lookups_by_bank_id branch from acac655 to 8b26ba8 Compare October 27, 2026 20:21
@roryharr roryharr changed the title Cache lookups by bankId Flush cache by bank_id Oct 27, 2026
@roryharr
roryharr marked this pull request as ready for review October 27, 2026 21:46
@roryharr
roryharr requested a review from a team as a code owner October 27, 2026 21:46
@roryharr
roryharr requested a review from brooksprumo October 27, 2026 21:46

@brooksprumo brooksprumo left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

:shipit:

@roryharr
roryharr added this pull request to the merge queue Oct 28, 2026
Merged via the queue into anza-xyz:master with commit 9708cbd Oct 28, 2026
50 checks passed
@roryharr
roryharr deleted the cache_lookups_by_bank_id branch October 28, 2026 15:22
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.

3 participants