GreateCode commented on code in PR #2734: URL: https://github.com/apache/brpc/pull/2734#discussion_r1712620738
########## src/brpc/channel.cpp: ########## @@ -495,8 +496,10 @@ void Channel::CallMethod(const google::protobuf::MethodDescriptor* method, // overriding connect_timeout_ms does not make sense, just use the // one in ChannelOptions cntl->_connect_timeout_ms = _options.connect_timeout_ms; - if (cntl->backup_request_ms() == UNSET_MAGIC_NUM) { + if (cntl->backup_request_ms() == UNSET_MAGIC_NUM && + NULL != cntl->_backup_request_policy) { cntl->set_backup_request_ms(_options.backup_request_ms); + cntl->_backup_request_policy = _options.backup_request_policy; } Review Comment: 好像这样也不好,cntl设置了backup_request_ms,没设置policy,channel设置了policy,最终用到的是channel policy的backup_request_ms。。 要不去掉policy里的GetBackupRequestMs接口吧,感觉用处不大,cntl和channel options的backup_request_ms足够用了。 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org