-
Notifications
You must be signed in to change notification settings - Fork 719
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
pdctl: fix region key problems in detach mode #1298
Conversation
@@ -303,8 +324,7 @@ func showRegionsFromStartKeyCommandFunc(cmd *cobra.Command, args []string) { | |||
fmt.Println("Error: unknown format") | |||
return | |||
} | |||
// TODO: Deal with path escaped | |||
prefix := regionKeyPrefix + "/" + key | |||
prefix := regionKeyPrefix + "/" + url.QueryEscape(key) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to update server-side to adapt this change?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems #1299 will deal with this problem. I will remove it from this PR.
/rebuild |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
* server, client: fix hanging problem when etcd failed to start (#1267) * server: use same initialcluster config to restart joined member (#1279) * fix server build * pdctl: cherry pick bugfixes (#1298, #1299, #1308) * server/api: fix the issue about `regions/check` API (#1311) * fix join build * fix pdctl build * fix region test * fix warnings
What problem does this PR solve?
Currently,
pd-ctl
doesn't support using--format
in detach mode and also can not decode the key which contains some escape characters, such as\n
.What is changed and how it works?
This PR fixes this two problems. After this PR, we need to wrap the key with single quotes
'
inpd-ctl
.For example, we can use the below command to find the region for a given key:
Check List
Tests
Related changes