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

add subset, offset and size index #146

Closed
wants to merge 9 commits into from
Closed

Conversation

anjor
Copy link
Contributor

@anjor anjor commented Aug 11, 2024

No description provided.

@anjor anjor marked this pull request as draft August 11, 2024 13:16
@anjor anjor marked this pull request as ready for review August 12, 2024 14:10
import "errors"

type SubsetOffsetAndSize struct {
Subset uint64 // uint24, 3 bytes, max 16.7 MB (megabytes)
Copy link
Contributor

Choose a reason for hiding this comment

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

could be even smaller? uint16 ? but might not be worth it and better to have an extra byte

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah I don't have a strong opinion here. @gagliardetto ?

Copy link
Collaborator

Choose a reason for hiding this comment

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

yeah uint16 should be eough

var network indexes.Network
var indexDir string
return &cli.Command{
Name: "cid-to-offset",
Copy link
Collaborator

Choose a reason for hiding this comment

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

this probably needs a different name

@gagliardetto
Copy link
Collaborator

given that we have the metadata that states the byte beginning and end of split piece, we can avoid creating this new index and just use the existing cid-to-offset-and-size

there will be an extra step that will calculate the subset file from an offset.

@gagliardetto
Copy link
Collaborator

@linuskendall @anjor

@anjor
Copy link
Contributor Author

anjor commented Sep 5, 2024

given that we have the metadata that states the byte beginning and end of split piece

Do we have this @gagliardetto ?

@anjor
Copy link
Contributor Author

anjor commented Sep 5, 2024

Ohhh you are saying we should add it -- #132 (comment)

@anjor
Copy link
Contributor Author

anjor commented Sep 17, 2024

I suspect we are not going to need this after merging #132

Basically the existing indexes will "just work"

@anjor anjor closed this Oct 1, 2024
@anjor anjor deleted the anjor/cid-to-subset-and-offset branch October 1, 2024 12:42
@anjor anjor restored the anjor/cid-to-subset-and-offset branch October 2, 2024 10:59
@anjor anjor deleted the anjor/cid-to-subset-and-offset branch October 2, 2024 11:00
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.

3 participants