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

feat(server): Implement CONFIG HELP command #2510

Merged
merged 2 commits into from
Feb 1, 2024

Conversation

highpon
Copy link
Contributor

@highpon highpon commented Jan 31, 2024

Related Issue: #857

The CONFIG HELP command is implemented in this PR.
The implementation of the CONFIG HELP command in Redis 7.2 was used as a reference.
The notation of the CONFIG HELP command in Redis 7.2 is as follows.

 1) CONFIG <subcommand> [<arg> [value] [opt] ...] . Subcommands are: .
 2) GET <pattern> .
 3)     Return parameters matching the glob-like <pattern> and their values.
 4) SET <directive> <value> 5) Set the configuration <directive> <value> .
 5)     Set the configuration <directive> to <value>.
 6) RESETSTAT
 7)     Reset statistics reported by the INFO command.
 8) REWRITE
 9)     Rewrite the configuration file.
10) HELP
11)    Prints this help.

The CONFIG REWRITE command is not yet implemented in the current DragonflyDB.
The newly implemented CONFIG HELP command excludes the CONFIG REWRITE command.

@romange
Copy link
Collaborator

romange commented Feb 1, 2024

Thank you! We have not reached conclusions that REWRITE is needed at all.

@romange romange requested a review from chakaz February 1, 2024 06:32
Copy link
Collaborator

@chakaz chakaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your contribution!
Please see super small nits, but otherwise looks good :)

"RESETSTAT",
" Reset statistics reported by the INFO command.",
"HELP",
" Prints this help."};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
" Prints this help."};
" Prints this help."
};

Comment on lines 1492 to 1493
rb->SendSimpleStrArr(help_arr);
return;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
rb->SendSimpleStrArr(help_arr);
return;
return rb->SendSimpleStrArr(help_arr);

@highpon
Copy link
Contributor Author

highpon commented Feb 1, 2024

@chakaz
Thanks for your review!
PR updated.

Copy link
Collaborator

@chakaz chakaz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks again!

@chakaz chakaz merged commit 7e875bd into dragonflydb:main Feb 1, 2024
7 checks passed
@highpon highpon deleted the fix/857-for-config branch February 2, 2024 01:41
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.

None yet

3 participants