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

fix: PersistedShard.URL should do QueryUnescape before url.Parse. #158

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ricktian1226
Copy link

@ricktian1226 ricktian1226 commented Apr 18, 2023

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 [email protected]/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.

@ricktian1226 ricktian1226 changed the title PersistedShard.URL should do QueryUnescape before url.Parse. fix: PersistedShard.URL should do QueryUnescape before url.Parse. Apr 18, 2023
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.

1 participant