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: support non sharded IPFS block paths #541

Merged
merged 1 commit into from
Sep 27, 2024
Merged

Conversation

nathanielc
Copy link
Collaborator

When migrating from IPFS there are two possible directory structures, a sharded and a non sharded form. This change now supports both defaulting to the sharded form.

When migrating from IPFS there are two possible directory structures, a
sharded and a non sharded form. This change now supports both defaulting
to the sharded form.
@nathanielc nathanielc requested review from stbrody and a team as code owners September 26, 2024 19:24
@nathanielc nathanielc requested review from AaronGoldman and removed request for a team September 26, 2024 19:24
Comment on lines +55 to +57
/// Sharded paths are organized into a two character prefix directories.
#[arg(long, env = "CERAMIC_ONE_NON_SHARDED_PATHS", default_value_t = false)]
non_sharded_paths: bool,
Copy link

Choose a reason for hiding this comment

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

FWIW, the sharding/key transformations are a configurable property of the blockstore and not a binary choice. But this should cover the "didn't actively configure sharding" case, and the most common option I guess.

https://github.com/ipfs/kubo/blob/master/docs/datastores.md

Copy link
Member

Choose a reason for hiding this comment

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

This is probably fine for now. These are the two most likely configs, doubt someone has some other setup, and we could easily change this if someone else does something different.

Copy link
Member

@oed oed left a comment

Choose a reason for hiding this comment

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

lgtm

Comment on lines +55 to +57
/// Sharded paths are organized into a two character prefix directories.
#[arg(long, env = "CERAMIC_ONE_NON_SHARDED_PATHS", default_value_t = false)]
non_sharded_paths: bool,
Copy link
Member

Choose a reason for hiding this comment

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

This is probably fine for now. These are the two most likely configs, doubt someone has some other setup, and we could easily change this if someone else does something different.

@nathanielc nathanielc added this pull request to the merge queue Sep 27, 2024
Merged via the queue into main with commit c7f5e4a Sep 27, 2024
5 checks passed
@nathanielc nathanielc deleted the feat/migration-no-shard branch September 27, 2024 15:06
@smrz2001 smrz2001 mentioned this pull request Oct 7, 2024
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