Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transfer C++ SDK segfault fix to SDK V3 #13761

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading