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

Persistence API #19

Merged
merged 8 commits into from
May 18, 2023
Merged

Persistence API #19

merged 8 commits into from
May 18, 2023

Conversation

Yiling-J
Copy link
Owner

@Yiling-J Yiling-J commented May 17, 2023

func (c *Cache[K, V]) SaveCache(version uint64, writer io.Writer) error
func (c *Cache[K, V]) LoadCache(version uint64, reader io.Reader) error 

Use gob internally and persist following:

  • Cached data
  • CountMinSketch
  • Segmented LRU

Record data checksum on Save and do checksum verification on Load

@codecov-commenter
Copy link

codecov-commenter commented May 17, 2023

Codecov Report

Patch coverage: 78.16% and project coverage change: -3.45 ⚠️

Comparison is base (850b817) 95.65% compared to head (4ab3283) 92.20%.

❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #19      +/-   ##
==========================================
- Coverage   95.65%   92.20%   -3.45%     
==========================================
  Files          12       13       +1     
  Lines        1196     1450     +254     
==========================================
+ Hits         1144     1337     +193     
- Misses         36       76      +40     
- Partials       16       37      +21     
Impacted Files Coverage Δ
internal/list.go 91.93% <71.42%> (-4.19%) ⬇️
internal/store.go 89.61% <72.10%> (-8.86%) ⬇️
internal/persistence.go 90.62% <90.62%> (ø)
cache.go 100.00% <100.00%> (ø)
internal/entry.go 95.06% <100.00%> (+1.51%) ⬆️
internal/sketch.go 96.38% <100.00%> (ø)
internal/timerwheel.go 100.00% <100.00%> (+2.91%) ⬆️

... and 1 file with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@Yiling-J Yiling-J marked this pull request as ready for review May 18, 2023 04:41
@Yiling-J Yiling-J merged commit 29018ac into main May 18, 2023
@Yiling-J Yiling-J deleted the persistence branch May 22, 2023 14:25
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