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

feat(share/store/cache): Split accessor cache into recent and blockstore #2656

Merged
merged 20 commits into from
Sep 18, 2023

Conversation

walldiss
Copy link
Member

@walldiss walldiss commented Sep 5, 2023

Adds MultiCache. Replaces eds store cache with multicache containing 2 separate caches:

  • recently added edses (10 accessors, added on put only)
  • edses requested by ipld (128 accessors, added on request to blockstore from bitswap server)

@walldiss walldiss added area:shares Shares and samples area:storage labels Sep 5, 2023
@walldiss walldiss self-assigned this Sep 5, 2023
@walldiss walldiss force-pushed the split-accessor-cache-for-real branch from 8b657c1 to 04d7c6c Compare September 6, 2023 09:35
# Conflicts:
#	share/eds/blockstore.go
#	share/eds/cache/accessor_cache.go
#	share/eds/cache/accessor_cache_test.go
#	share/eds/cache/cache.go
#	share/eds/cache/metrics.go
#	share/eds/store.go
#	share/eds/store_test.go
#	share/eds/utils.go
#	share/p2p/shrexeds/server.go
@walldiss walldiss marked this pull request as ready for review September 18, 2023 09:17
@walldiss walldiss added the kind:feat Attached to feature PRs label Sep 18, 2023
Copy link
Member

@renaynay renaynay left a comment

Choose a reason for hiding this comment

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

lets call the file doublecache too

share/eds/store.go Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #2656 (0804d6c) into main (4d98585) will decrease coverage by 0.08%.
The diff coverage is 38.29%.

@@            Coverage Diff             @@
##             main    #2656      +/-   ##
==========================================
- Coverage   51.55%   51.48%   -0.08%     
==========================================
  Files         162      163       +1     
  Lines       10755    10784      +29     
==========================================
+ Hits         5545     5552       +7     
- Misses       4729     4751      +22     
  Partials      481      481              
Files Changed Coverage Δ
share/eds/cache/multicache.go 0.00% <0.00%> (ø)
share/eds/store.go 66.91% <57.14%> (-1.17%) ⬇️
share/eds/utils.go 66.66% <75.00%> (-11.91%) ⬇️
share/eds/blockstore.go 38.70% <100.00%> (+1.20%) ⬆️

... and 6 files with indirect coverage changes

distractedm1nd
distractedm1nd previously approved these changes Sep 18, 2023
share/eds/blockstore.go Outdated Show resolved Hide resolved
share/eds/store.go Outdated Show resolved Hide resolved
@distractedm1nd
Copy link
Collaborator

Should we robusta test this before we merge into main?

@walldiss
Copy link
Member Author

I would rather run tests once all cache relateed PRs are merged. There are 2 more left, but they are relatedly simple

@renaynay
Copy link
Member

@walldiss then we should cut an RC once you get the next 2 up

@walldiss walldiss enabled auto-merge (squash) September 18, 2023 12:50
@walldiss walldiss merged commit 288e992 into celestiaorg:main Sep 18, 2023
11 of 13 checks passed
vgonkivs pushed a commit to vgonkivs/celestia-node that referenced this pull request Oct 5, 2023
…ore (celestiaorg#2656)

Adds MultiCache. Replaces eds store cache with multicache containing 2
separate caches:

- recently added edses (10 accessors, added on put only)
- edses requested by ipld (128 accessors, added on request to blockstore
from bitswap server)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:shares Shares and samples area:storage kind:feat Attached to feature PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants