fix: PersistedShard.URL should do QueryUnescape before url.Parse. #158
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In my dev environment, PersistedShard.URL contains some escape characters, like '%2F'. The whole URL is
file://%2Fhome%2Fricktian%2Fworkspace%2Flotus_dev%2Fcar%2Fbafk2bzaceddnvrk2uexrfib7yerhd754hw3ed2tfyvemkrpzflbyf2sbioswq.baga6ea4seaqbhygsit3b742jhtny3sjlznpjaevquj3unc4iugno6735z35hmny.car
, And this parse directory will cause error as follow:2023-04-17T15:52:15.006+0800 WARN dagstore dagstore@v0.7.0/dagstore.go:572 failed to recover state of shard /baga6ea4seaqbhygsit3b742jhtny3sjlznpjaevquj3unc4iugno6735z35hmny: failed to parse mount URL: parse "file://%2Fhome%2Fricktian%2Fworkspace%2Flotus_dev%2Fcar%2Fbafk2bzaceddnvrk2uexrfib7yerhd754hw3ed2tfyvemkrpzflbyf2sbioswq.baga6ea4seaqbhygsit3b742jhtny3sjlznpjaevquj3unc4iugno6735z35hmny.car": invalid URL escape "%2F"; skipping
So PersistedShard.URL should be QueryUnescape before Parse.