-
Notifications
You must be signed in to change notification settings - Fork 8.8k
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
optimize : skip sending some request if client-version is v0 #6998
base: 2.x
Are you sure you want to change the base?
Conversation
…dolog-del # Conflicts: # changes/en-us/2.x.md # changes/zh-cn/2.x.md
…dolog-del # Conflicts: # changes/en-us/2.x.md # changes/zh-cn/2.x.md
if (LOGGER.isDebugEnabled()) { | ||
LOGGER.debug("Message sending will be skipped as the client version does not support it,{}", rpcMessage); | ||
} | ||
return new VersionNotSupportMessage(); |
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 that it is not being used anywhere. What will its role be in the future?
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 that it is not being used anywhere. What will its role be in the future?
比如以后的版本里如果要sync发送某个全新的request类,旧版本无法识别,在remote通信这层会返回VersionNotSupportMessage,发送者判断到返回类型是这个后做忽略处理或者抛出异常
For example, if you want to send a sync to a new request class in a future version that is not recognized by the old version, the versionNotSupportMessage will be returned at the remote communication level, and the sender will either ignore the return type or throw an exception.
Ⅰ. Describe what this PR did
sendAsync
和sendSync
都加上了,保证代码逻辑的一致性,但sendSync
的“if”是不会进的。VersionNotSupportMessage
。目前来说TC使用sendSync的逻辑不会做这种判断,后续如果有skip的情况就需要在接收的时候先判断类型,而不是直接强转。sendAsync
andsendSync
to ensure the consistency of code logic, but the “if” ofsendSync
will not be entered.VersionNotSupportMessage
. at present, TC use sendSync logic will not do this kind of judgment, and then if there is a skip case you need to judge the type of the first time you receive, rather than directly force the transfer.Translated with DeepL.com (free version)
Ⅱ. Does this pull request fix one issue?
fixes #6999
Ⅲ. Why don't you add test cases (unit test/integration test)?
Ⅳ. Describe how to verify it
Ⅴ. Special notes for reviews