Skip to content
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
9 changes: 7 additions & 2 deletions ydb/core/persqueue/partition_read.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -709,7 +709,8 @@ void TPartition::DoRead(TEvPQ::TEvRead::TPtr ev, TDuration waitQuotaTime, const
const TString& user = read->ClientId;
auto userInfo = UsersInfoStorage->GetIfExists(user);
if(!userInfo) {
ReplyError(ctx, read->Cookie, NPersQueue::NErrorCode::BAD_REQUEST, TStringBuilder() << "cannot finish read request. Consumer " << read->ClientId << " is gone from partition");
ReplyError(ctx, read->Cookie, NPersQueue::NErrorCode::BAD_REQUEST,
TStringBuilder() << "cannot finish read request. Consumer " << read->ClientId << " is gone from partition");
Send(ReadQuotaTrackerActor, new TEvPQ::TEvConsumerRemoved(user));
OnReadRequestFinished(read->Cookie, 0, user, ctx);
return;
Expand Down Expand Up @@ -757,7 +758,11 @@ void TPartition::DoRead(TEvPQ::TEvRead::TPtr ev, TDuration waitQuotaTime, const
return;
}

Y_ABORT_UNLESS(offset < EndOffset);
if (offset > EndOffset) {
ReplyError(ctx, read->Cookie, NPersQueue::NErrorCode::BAD_REQUEST,
TStringBuilder() << "Offset more than EndOffset. Offset=" << offset << ", EndOffset=" << EndOffset);
return;
}

ProcessRead(ctx, std::move(info), cookie, false);
}
Expand Down