-
Notifications
You must be signed in to change notification settings - Fork 238
feat: LittDB caching #1526
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
feat: LittDB caching #1526
Conversation
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
Signed-off-by: Cody Littley <[email protected]>
common/cache/fifo_cache.go
Outdated
|
||
// expirationRecord is a record of when a key was inserted into the cache, and is used to decide when it should be | ||
// evicted. | ||
type expirationRecord struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is some mixed terminology throughout this PR: eviction
and expiration
seem to be used interchangeably. Probably best to settle on a single term, unless there is a nuanced difference I'm missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They mean the same thing in this context. Decided to go with "eviction".
Signed-off-by: Cody Littley <[email protected]>
* Improved littDB caching. Signed-off-by: Cody Littley <[email protected]> * Added separate read and write cache. Signed-off-by: Cody Littley <[email protected]> * Add metrics for the cache. Signed-off-by: Cody Littley <[email protected]> * Configure validator read rate limits Signed-off-by: Cody Littley <[email protected]> * Add caching unit test. Signed-off-by: Cody Littley <[email protected]> * made suggested changes Signed-off-by: Cody Littley <[email protected]> --------- Signed-off-by: Cody Littley <[email protected]>
Why are these changes needed?
Add a read and write cache to littDB, and support operations that are cache aware. Add cache aware throttling to the
GetChunks()
validator RPC.