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

Automatically shard directories #43

Open
alanshaw opened this issue Mar 14, 2023 · 1 comment
Open

Automatically shard directories #43

alanshaw opened this issue Mar 14, 2023 · 1 comment

Comments

@alanshaw
Copy link
Member

#41 added HAMT sharded directories support but it is opt in - you need to explicitly use the sharded directory writer.

In most IPFS implementations, the use of sharded directories (or not) depends on the byte size of the directory block with all the items in it. i.e. if the directory block exceeds a given size it automatically becomes a sharded directory.

@rvagg
Copy link
Member

rvagg commented Mar 14, 2023

fwiw there's a test case that's shared across the other 3 main implementations that would be neat to have in here as well when you get to it - the boundary case for auto-sharding with defaults, where a particular CID is expected for the root of the test data before crossing the boundary and another CID is expected when you cross the boundary and get a sharded form. Alex recently got it working with js-ipfs-unixfs @ ipfs/js-ipfs-unixfs#171 and there's some notes in there about the nuances of what's actually being measured for "size" (i.e. it's not actual block size, for historical reasons, but kind of an approximation).

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

No branches or pull requests

2 participants