aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoritrofimow <itrofimow@yandex-team.com>2024-01-23 16:39:33 +0300
committeritrofimow <itrofimow@yandex-team.com>2024-01-23 17:06:52 +0300
commit551cba187dcaa100eca4fd168404819417232fac (patch)
tree2a2f6f12240c195a99006de69dafe5b7688d52dd
parent8ebb5e504f638cbfc9bc614113db611c62630bdb (diff)
downloadydb-551cba187dcaa100eca4fd168404819417232fac.tar.gz
bug contrib/grpc: fix races between retries and cancellation
-rw-r--r--contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc
index 7ec4d5389c..c98ce6ee0b 100644
--- a/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc
+++ b/contrib/libs/grpc/src/core/ext/filters/client_channel/retry_filter.cc
@@ -2604,7 +2604,9 @@ void RetryFilter::CallData::OnRetryTimerLocked(void* arg,
grpc_error_handle /*error*/) {
auto* calld = static_cast<CallData*>(arg);
calld->retry_timer_handle_.reset();
- calld->CreateCallAttempt(/*is_transparent_retry=*/false);
+ if (calld->cancelled_from_surface_.ok()) {
+ calld->CreateCallAttempt(/*is_transparent_retry=*/false);
+ }
GRPC_CALL_STACK_UNREF(calld->owning_call_, "OnRetryTimer");
}