MCPcopy Create free account
hub / github.com/apache/brpc / backup_request_ms

Method backup_request_ms

src/brpc/controller.cpp:353–369  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

351}
352
353int64_t Controller::backup_request_ms() const {
354 int timeout_ms = _backup_request_ms;
355 if (NULL != _backup_request_policy) {
356 const int32_t policy_ms = _backup_request_policy->GetBackupRequestMs(this);
357 // -1 is the designated sentinel: the policy defers to the channel-level
358 // backup_request_ms (set from ChannelOptions). Any other negative value
359 // disables backup for this RPC. Values >= 0 override directly.
360 if (policy_ms != -1) {
361 timeout_ms = policy_ms;
362 }
363 }
364 if (timeout_ms > 0x7fffffff) {
365 timeout_ms = 0x7fffffff;
366 LOG(WARNING) << "backup_request_ms is limited to 0x7fffffff (roughly 24 days)";
367 }
368 return timeout_ms;
369}
370
371void Controller::set_max_retry(int max_retry) {
372 if (max_retry > MAX_RETRY_COUNT) {

Callers 2

HandleSocketFailedMethod · 0.80
CallMethodMethod · 0.80

Calls 1

GetBackupRequestMsMethod · 0.45

Tested by

no test coverage detected