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 config rewrite overwrite the first rename-command with the last one #429

Merged
merged 1 commit into from
Dec 16, 2021
Merged

Fix config rewrite overwrite the first rename-command with the last one #429

merged 1 commit into from
Dec 16, 2021

Conversation

git-hulk
Copy link
Member

For example, we have below rename-commands in the config file:

rename-command KEYS KEYS_NEW
rename-command GET  GET_NEW
rename-command SET  SET_NEW

then rename-command KEYS KEYS_NEW would be overwriten to
rename-command SET SET_NEW since we didn't skip the rename-command
correctly in config rewrite.

Closes #428

For example, we have below rename-commands in the config file:
```
rename-command KEYS KEYS_NEW
rename-command GET  GET_NEW
rename-command SET  SET_NEW
```
then `rename-command KEYS KEYS_NEW` would be overwriten to
`rename-command SET  SET_NEW` since we didn't skip the `rename-command`
correctly in config rewrite.
@git-hulk git-hulk requested a review from ShooterIT December 16, 2021 16:30
@git-hulk
Copy link
Member Author

tcl tests config overvides didn't support multi items with the same key name like rename-command, so let's test it with the googletest.

@git-hulk git-hulk merged commit 6c8534a into apache:unstable Dec 16, 2021
ShooterIT pushed a commit to ShooterIT/kvrocks that referenced this pull request Jan 27, 2022
…ne (apache#429)

For example, we have below rename-commands in the config file:
```
rename-command KEYS KEYS_NEW
rename-command GET  GET_NEW
rename-command SET  SET_NEW
```
then `rename-command KEYS KEYS_NEW` would be overwriten to
`rename-command SET  SET_NEW` since we didn't skip the `rename-command`
correctly in config rewrite.
@ShooterIT ShooterIT mentioned this pull request Jan 27, 2022
ShooterIT pushed a commit that referenced this pull request Jan 28, 2022
…ne (#429)

For example, we have below rename-commands in the config file:
```
rename-command KEYS KEYS_NEW
rename-command GET  GET_NEW
rename-command SET  SET_NEW
```
then `rename-command KEYS KEYS_NEW` would be overwriten to
`rename-command SET  SET_NEW` since we didn't skip the `rename-command`
correctly in config rewrite.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] It is wrong to rewrite config rename-command and lead kvrocks to fail to restart
2 participants