Skip to content

Conversation

cody-littley
Copy link
Contributor

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.

@cody-littley cody-littley self-assigned this May 5, 2025
@cody-littley cody-littley requested review from ian-shim and litt3 May 5, 2025 18:53
@cody-littley cody-littley marked this pull request as ready for review May 5, 2025 19:30

// 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 {
Copy link
Contributor

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?

Copy link
Contributor Author

@cody-littley cody-littley May 6, 2025

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".

@cody-littley cody-littley requested a review from litt3 May 8, 2025 13:57
@cody-littley cody-littley merged commit 2a52abc into master May 8, 2025
15 checks passed
@cody-littley cody-littley deleted the littdb-caching branch May 8, 2025 18:41
ethenotethan pushed a commit that referenced this pull request May 14, 2025
* 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]>
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