-
Notifications
You must be signed in to change notification settings - Fork 13
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: index provider #182
feat: index provider #182
Conversation
6db560e
to
3d82c0c
Compare
5a4eda5
to
1ac908f
Compare
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.
In progress review, I imagine this will still change noticeably
|
||
func (p *Provider) GetEntry(block cid.Cid, provider string) ([]byte, error) { | ||
// We should use background context to avoid early exit | ||
// while chunking as first attempt will always fail |
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.
What? Why?
db *harmonydb.DB | ||
pieceProvider *pieceprovider.PieceProvider | ||
entriesChunker *chunker.Chunker | ||
cache *lru.Cache[ipld.Link, datamodel.Node] |
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.
Can we get rid of this cache and build/stream entries on the fly?
b2f25ed
to
4d22e9a
Compare
CREATE INDEX ipni_provider_ad_cid ON ipni(provider, ad_cid); | ||
|
||
|
||
CREATE TABLE ipni_head ( |
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.
TODO (me): Maybe this doesn't need to exist and can just be max(ipni.order_number)
// corresponding CAR offset. The order is maintained consistently regardless of | ||
// the underlying IterableIndex implementation. Returns error if duplicate | ||
// offsets detected. | ||
func CarMultihashIterator(idx index.IterableIndex) (*SliceMhIterator, error) { |
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.
TODO (me): Kill this with fire
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.
TODO (me): Seems like this snuck back into here again
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.
Will work on this on top of the main branch
FYI: I am working on a FRC to document the Retrieval Checking Requirements, see filecoin-project/FIPs#1089 |
This PR breaks IPNI advertisement and publishing into separate modules. If IPNI is enabled: