-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Support backup request policy #2734
base: master
Are you sure you want to change the base?
Conversation
e81c8e8
to
c8a88bf
Compare
LGTM |
src/brpc/controller.cpp
Outdated
@@ -1259,6 +1278,11 @@ int Controller::HandleSocketFailed(bthread_id_t id, void* data, int error_code, | |||
cntl->timeout_ms(), | |||
butil::endpoint2str(cntl->remote_side()).c_str()); | |||
} else if (error_code == EBACKUPREQUEST) { | |||
BackupRequestPolicy* policy = cntl->_backup_request_policy; |
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.
我看RetryPolicy和backup重试都是在OnVersionedRPCReturned这个函数里面,没理解为啥这个policy要在这里。
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.
当时想着就不需要SetFailed和起协程了。但是现在发现BackupRequestPolicy同样有#2419 的问题,所以还是得改成在OnVersionedRPCReturned里面。
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.
@yanglimingcn 再看看
What problem does this PR solve?
Issue Number: resolve #2668 , resolve #2695
Problem Summary:
What is changed and the side effects?
Changed:
Side effects:
Performance effects(性能影响):
Breaking backward compatibility(向后兼容性):
Check List: