diff options
author | aneporada <aneporada@ydb.tech> | 2023-05-22 16:58:32 +0300 |
---|---|---|
committer | aneporada <aneporada@ydb.tech> | 2023-05-22 16:58:32 +0300 |
commit | 89cffac5fd65d1295275730239774451701c7ec0 (patch) | |
tree | e4eea379b7da35b805454b06eec3acd6b6685d1c | |
parent | 7b06ae00f14aff82006eeeb5375af1a79ef2cf00 (diff) | |
download | ydb-89cffac5fd65d1295275730239774451701c7ec0.tar.gz |
Fix handling Get() result for async channel storage
initial
-rw-r--r-- | ydb/library/yql/dq/runtime/dq_output_channel.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/ydb/library/yql/dq/runtime/dq_output_channel.cpp b/ydb/library/yql/dq/runtime/dq_output_channel.cpp index 0a8cf3a62af..08864c6556d 100644 --- a/ydb/library/yql/dq/runtime/dq_output_channel.cpp +++ b/ydb/library/yql/dq/runtime/dq_output_channel.cpp @@ -176,8 +176,13 @@ public: data.ClearRaw(); if (FirstStoredId < NextStoredId) { YQL_ENSURE(Storage); + LOG("Loading spilled blob. BlobId: " << FirstStoredId); TBuffer blob; - YQL_ENSURE(Storage->Get(FirstStoredId++, blob), "Lost block in storage"); + if (!Storage->Get(FirstStoredId, blob)) { + LOG("BlobId " << FirstStoredId << " not ready yet"); + return false; + } + ++FirstStoredId; ui64 rows; YQL_ENSURE(blob.size() >= sizeof(rows)); std::memcpy((char*)&rows, blob.data(), sizeof(rows)); |