From a6423bf330c10089d7a0e2aaa8d971d0dcbb3fcf Mon Sep 17 00:00:00 2001 From: maybenotilya Date: Fri, 17 Apr 2026 11:57:44 +0300 Subject: YT-26179: Add Abort for readers * Changelog entry Type: feature Component: cpp-sdk Add Abort for table readers commit_hash:be5026883c90d18333f20468946f1e5a5b71839b --- yt/cpp/mapreduce/client/partition_reader.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'yt/cpp/mapreduce/client/partition_reader.cpp') diff --git a/yt/cpp/mapreduce/client/partition_reader.cpp b/yt/cpp/mapreduce/client/partition_reader.cpp index a2ca7eb9758..d849040d854 100644 --- a/yt/cpp/mapreduce/client/partition_reader.cpp +++ b/yt/cpp/mapreduce/client/partition_reader.cpp @@ -12,7 +12,7 @@ class TPartitionTableReader : public TRawTableReader { public: - TPartitionTableReader(std::unique_ptr input) + TPartitionTableReader(std::unique_ptr input) : Input_(std::move(input)) { } @@ -32,6 +32,16 @@ public: return false; } + void Abort() override + { + Input_->Abort(); + } + + bool IsAborted() const override + { + return Input_->IsAborted(); + } + protected: size_t DoRead(void* buf, size_t len) override { @@ -39,7 +49,7 @@ protected: } private: - std::unique_ptr Input_; + std::unique_ptr Input_; }; //////////////////////////////////////////////////////////////////////////////// @@ -52,7 +62,7 @@ TRawTableReaderPtr CreateTablePartitionReader( const TTablePartitionReaderOptions& options) { - auto stream = NDetail::RequestWithRetry>( + auto stream = NDetail::RequestWithRetry>( retryPolicy, [&] (TMutationId /*mutationId*/) { return rawClient->ReadTablePartition(cookie, format, options); -- cgit v1.3