diff options
| author | ermolovd <[email protected]> | 2026-04-28 10:36:20 +0300 |
|---|---|---|
| committer | ermolovd <[email protected]> | 2026-04-28 11:34:34 +0300 |
| commit | 693274b40b1a9ebdf2da02f2e87fbc8502105738 (patch) | |
| tree | 229c575c802e7ae1f9290502efce9b5879fbfea3 /yt/cpp/mapreduce/client/transaction.cpp | |
| parent | 10edf8d9197e9c45458d73cb57a601e0827d159c (diff) | |
YT-27827: TPingerTransaction use BlockingGet instead of WaitFor in destructor
commit_hash:90bbe36635e0d48c81c153567dcedf28f103efbe
Diffstat (limited to 'yt/cpp/mapreduce/client/transaction.cpp')
| -rw-r--r-- | yt/cpp/mapreduce/client/transaction.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/yt/cpp/mapreduce/client/transaction.cpp b/yt/cpp/mapreduce/client/transaction.cpp index 289c89340e6..c54d01f8136 100644 --- a/yt/cpp/mapreduce/client/transaction.cpp +++ b/yt/cpp/mapreduce/client/transaction.cpp @@ -10,6 +10,8 @@ #include <yt/cpp/mapreduce/interface/error_codes.h> #include <yt/cpp/mapreduce/interface/raw_client.h> +#include <yt/yt/core/actions/future.h> + #include <util/datetime/base.h> #include <util/generic/scope.h> @@ -166,11 +168,11 @@ void TPingableTransaction::Stop(EStopAction action) }); break; case EStopAction::Abort: - NDetail::RequestWithRetry<void>( - ClientRetryPolicy_->CreatePolicyForGenericRequest(), - [this] (TMutationId& mutationId) { - RawClient_->AbortTransaction(mutationId, TransactionId_); - }); + // Aborting transaction can be called from destructor while unwinding exception stack. + // We can't call WaitFor in such conditions (and internally we do it). + // So we offload aborting to separate thread. + Pinger_->AsyncAbortTransaction(TransactionId_) + .BlockingGet(); break; case EStopAction::Detach: // Do nothing. |
