Skip to content

Commit

Permalink
Transfer C++ SDK segfault fix to SDK V3 (#13761)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gazizonoki authored Jan 23, 2025
1 parent 7633654 commit ddb7832
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ydb/public/sdk/cpp/src/client/table/table.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1365,13 +1365,15 @@ TScanQueryPartIterator::TScanQueryPartIterator(
{}

TAsyncScanQueryPart TScanQueryPartIterator::ReadNext() {
if (ReaderImpl_->IsFinished())
if (!ReaderImpl_ || ReaderImpl_->IsFinished()) {
if (!IsSuccess())
RaiseError(TStringBuilder() << "Attempt to perform read on an unsuccessful result "
<< GetIssues().ToString());
RaiseError("Attempt to perform read on invalid or finished stream");
}
return ReaderImpl_->ReadNext(ReaderImpl_);
}



static bool IsSessionStatusRetriable(const TCreateSessionResult& res) {
switch (res.GetStatus()) {
case EStatus::OVERLOADED:
Expand Down

0 comments on commit ddb7832

Please sign in to comment.