hyperdrive
hyperdrive copied to clipboard
duplicate entry shouldn't get added to metadata twice
If the same file, with the same content + metadata, is added twice, it shouldn't be added to the metadata twice.
Happening in the CLI. We can fix it there, but it seems like we should also protect against this in hyperdrive.
Unsure about this. I'm leaning towards "just dont do that" as checking if a file already exists has none trivial perf overhead (needs hashing)
Yeah I suggest we check the hash against current and noop if it's not a change. Then we add an option flag, allowDuplicate
or something like that, which if true will skip the hash check.
Hashing will impose a significant overhead. While more correct, we might still get better results with just "overwriting" with the identical, no?
The hashing will occur in either situation, won't it? You have to hash any new writes to the hypercore