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

Remove unnecessary message #8219

Merged
merged 2 commits into from
Sep 6, 2024
Merged
Changes from 1 commit
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
14 changes: 5 additions & 9 deletions ydb/core/tx/datashard/build_index.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -664,15 +664,14 @@ void TDataShard::HandleSafe(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev,
return;
}

auto response = MakeHolder<TEvDataShard::TEvBuildIndexProgressResponse>();
response->Record.SetBuildIndexId(record.GetBuildIndexId());
response->Record.SetTabletId(TabletID());
response->Record.SetStatus(NKikimrIndexBuilder::EBuildStatus::ACCEPTED);

TScanRecord::TSeqNo seqNo = {record.GetSeqNoGeneration(), record.GetSeqNoRound()};
response->Record.SetRequestSeqNoGeneration(seqNo.Generation);
response->Record.SetRequestSeqNoRound(seqNo.Round);
auto badRequest = [&](const TString& error) {
auto response = MakeHolder<TEvDataShard::TEvBuildIndexProgressResponse>();
response->Record.SetBuildIndexId(record.GetBuildIndexId());
response->Record.SetTabletId(TabletID());
response->Record.SetRequestSeqNoGeneration(seqNo.Generation);
response->Record.SetRequestSeqNoRound(seqNo.Round);
response->Record.SetStatus(NKikimrIndexBuilder::EBuildStatus::BAD_REQUEST);
auto issue = response->Record.AddIssues();
issue->set_severity(NYql::TSeverityIds::S_ERROR);
Expand All @@ -699,7 +698,6 @@ void TDataShard::HandleSafe(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev,
if (const auto* recCard = ScanManager.Get(buildIndexId)) {
if (recCard->SeqNo == seqNo) {
// do no start one more scan
ctx.Send(ev->Sender, std::move(response));
return;
}

Expand Down Expand Up @@ -774,8 +772,6 @@ void TDataShard::HandleSafe(TEvDataShard::TEvBuildIndexCreateRequest::TPtr& ev,
TScanRecord recCard = {scanId, seqNo};

ScanManager.Set(buildIndexId, recCard);

ctx.Send(ev->Sender, std::move(response));
}

}
Loading