Skip to content

Redesign chunk LRU with a simpler design#56

Merged
johnramsden merged 4 commits intomainfrom
fixchunklru
Jan 10, 2026
Merged

Redesign chunk LRU with a simpler design#56
johnramsden merged 4 commits intomainfrom
fixchunklru

Conversation

@johnramsden
Copy link
Copy Markdown
Owner

Redesign chunk LRU with a simpler design
Rather than trying to keep so much state in sync, simplify the methodology to:

  • always invalidate based on the lru, completely including the map, now state is always consistent without keeping track of many data structures to see if lru entries are invalid and such
  • cleaning simply looks at priorities and migrates data accordingly

This significantly simplifies the design.

To keep the lru consistent we remove the lru entries within the eviction phase for the respective Zone
We insert them back and we migrate data

Additionally, to exclude corruption from currently writing zones, we remove candidate zones from the open zones list if they are resident

Rather than trying to keep so much state in sync, simplify the methodology to:

* always invalidate based on the lru, completely including the map, now state is always consistent without keeping track of many data structures to see if lru entries are invalid and such
* cleaning simply looks at priorities and migrates data accordingly

This significantly simplifies the design.

To keep the lru consistent we remove the lru entries within the eviction phase for the respective Zone
We insert them back and we migrate data

Additionally, to exclude corruption from currently writing zones, we remove candidate zones from the open zones list if they are resident
Copy link
Copy Markdown

@pokej6 pokej6 left a comment

Choose a reason for hiding this comment

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

Noticing a lack of tests in this PR but generally changes seem like positive iterations and we chatted in discord. Ship it

@johnramsden johnramsden merged commit eda13fa into main Jan 10, 2026
2 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