Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch page cache to approximate LRU #875

Merged
merged 1 commit into from
Oct 11, 2024
Merged

Switch page cache to approximate LRU #875

merged 1 commit into from
Oct 11, 2024

Conversation

cberner
Copy link
Owner

@cberner cberner commented Oct 8, 2024

No description provided.

@adamreichold
Copy link
Contributor

adamreichold commented Oct 8, 2024

Two questions/remarks:

  • Is keeping PrioritizedWriteCache around an artifact or is there something non-obvious of the priority mechanism left?
  • Adding a rationale for switch to the commit would be nice. Most importantly what problem of the current design does this resolve?

This resolves an edge case where values stored near the beginning of the
database file could become uncacheable. It also simplifies the caching
code
@cberner
Copy link
Owner Author

cberner commented Oct 9, 2024

It doesn't do any prioritization. It's just a wrapper around LRUCache to handle the way that cached pages are "borrowed" by the rest of the codebase.

I updated the commit

@adamreichold
Copy link
Contributor

I updated the commit

Thank you! Much easier to follow for me now.

@cberner cberner merged commit 3d184aa into master Oct 11, 2024
3 checks passed
@cberner cberner deleted the lru_cache branch October 11, 2024 00:30
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