dagstore icon indicating copy to clipboard operation
dagstore copied to clipboard

fix: `FileMount` should use url `Path` instead of `Host`

Open distractedm1nd opened this issue 1 year ago • 2 comments

We encountered a bug recently after switching from FSMount to FileMount.

The root cause of the problem was the usage of the Host field of url.URL to store the file path. This led to incorrect URL encoding, which caused the application to fail when trying to recover the state of shards.

Should we add backwards compatibility to the Deserialize method so that mounts previously Serialized() using Host will be loaded correctly?

distractedm1nd avatar Apr 13 '23 08:04 distractedm1nd

Great find! The most correct way to handle the change would be to perform a shard store migration. @nonsense @dirkmc I don't suppose we've encountered this issue in Boost or lotus-miner since we use a Filecoin-specific mount type?

raulk avatar Apr 13 '23 09:04 raulk

Yes, as you say we haven't come across this issue because we use a specific mount type

dirkmc avatar Apr 13 '23 10:04 dirkmc