-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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: hello command not return information of pika version #2990
base: 3.5
Are you sure you want to change the base?
fix: hello command not return information of pika version #2990
Conversation
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
@@ -3303,8 +3303,11 @@ void HelloCmd::Do() { | |||
} | |||
|
|||
std::string raw; | |||
char version[32]; | |||
snprintf(version, sizeof(version), "%d.%d.%d", PIKA_MAJOR, PIKA_MINOR, PIKA_PATCH); |
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.
这个version值本身有没有含义?比如version大于某个值,client的使用方式会不同?
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.
version大于7.2会调用CLIENT SETINFO去设置“lib-name"和"lib-ver"。
同时,我查了一下,对于没有修改的版本,如果使用lettuce进行连接的时候遇到”version must not be null“ 的问题,可以在配置类中指定lettuce使用RESP2进行连接,这样lettuce就不会调用hello来进行连接。
redis/lettuce#2350 (comment)
fix #2957 spring boot 3.x 连接pika报错 Version must not be null
hello cmmand 输出增加pika verison信息,避免某些连接需要读取verison信息,但是pika没有输出所导致的错误。
输出由:
"server"
"redis"
"proto"
(integer) 2
"mode"
"classic"
"role"
"master"
变更为:
"server"
"redis"
"version"
"4.0.0"
"proto"
(integer) 2
"mode"
"classic"
"role"
"master"