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

fix coredumps simple #12914

Merged
merged 1 commit into from
Dec 24, 2024
Merged
Show file tree
Hide file tree
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
6 changes: 4 additions & 2 deletions ydb/core/tx/columnshard/counters/writes_monitor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,16 @@ void TWritesMonitor::OnStartWrite(const ui64 dataSize) {
UpdateTabletCounters();
}

void TWritesMonitor::OnFinishWrite(const ui64 dataSize, const ui32 writesCount /*= 1*/) {
void TWritesMonitor::OnFinishWrite(const ui64 dataSize, const ui32 writesCount /*= 1*/, const bool onDestroy /*= false*/) {
AFL_VERIFY(writesCount <= WritesInFlightLocal);
AFL_VERIFY(dataSize <= WritesSizeInFlightLocal);
WritesSizeInFlightLocal -= dataSize;
WritesInFlightLocal -= writesCount;
AFL_VERIFY(0 <= WritesInFlight.Sub(writesCount));
AFL_VERIFY(0 <= WritesSizeInFlight.Sub(dataSize));
UpdateTabletCounters();
if (!onDestroy) {
UpdateTabletCounters();
}
}

TString TWritesMonitor::DebugString() const {
Expand Down
4 changes: 2 additions & 2 deletions ydb/core/tx/columnshard/counters/writes_monitor.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,12 @@ class TWritesMonitor: TNonCopyable {
}

~TWritesMonitor() {
OnFinishWrite(WritesSizeInFlightLocal, WritesInFlightLocal);
OnFinishWrite(WritesSizeInFlightLocal, WritesInFlightLocal, true);
}

void OnStartWrite(const ui64 dataSize);

void OnFinishWrite(const ui64 dataSize, const ui32 writesCount = 1);
void OnFinishWrite(const ui64 dataSize, const ui32 writesCount = 1, const bool onDestroy = false);

TString DebugString() const;

Expand Down
7 changes: 7 additions & 0 deletions ydb/core/tx/columnshard/data_reader/actor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,13 @@ void TActor::HandleExecute(NKqp::TEvKqpCompute::TEvScanError::TPtr& ev) {
PassAway();
}

void TActor::HandleExecute(NActors::TEvents::TEvUndelivered::TPtr& ev) {
SwitchStage(std::nullopt, EStage::Finished);
AFL_ERROR(NKikimrServices::TX_COLUMNSHARD_RESTORE)("event", "problem_on_event_undelivered")("reason", ev->Get()->Reason);
RestoreTask->OnError("cannot delivery event: " + ::ToString(ev->Get()->Reason));
PassAway();
}

void TActor::HandleExecute(NActors::TEvents::TEvWakeup::TPtr& /*ev*/) {
if (!CheckActivity()) {
TBase::Send(*ScanActorId, new NKqp::TEvKqp::TEvAbortExecution(NYql::NDqProto::StatusIds::ABORTED, "external task aborted"));
Expand Down
2 changes: 2 additions & 0 deletions ydb/core/tx/columnshard/data_reader/actor.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class TActor: public NActors::TActorBootstrapped<TActor> {
void HandleExecute(NKqp::TEvKqpCompute::TEvScanInitActor::TPtr& ev);
void HandleExecute(NKqp::TEvKqpCompute::TEvScanData::TPtr& ev);
void HandleExecute(NKqp::TEvKqpCompute::TEvScanError::TPtr& ev);
void HandleExecute(NActors::TEvents::TEvUndelivered::TPtr& ev);
void HandleExecute(NActors::TEvents::TEvWakeup::TPtr& ev);

public:
Expand All @@ -95,6 +96,7 @@ class TActor: public NActors::TActorBootstrapped<TActor> {
hFunc(NKqp::TEvKqpCompute::TEvScanInitActor, HandleExecute);
hFunc(NKqp::TEvKqpCompute::TEvScanData, HandleExecute);
hFunc(NKqp::TEvKqpCompute::TEvScanError, HandleExecute);
hFunc(NActors::TEvents::TEvUndelivered, HandleExecute);
hFunc(NActors::TEvents::TEvWakeup, HandleExecute);
default:
AFL_VERIFY(false)("type", ev->GetTypeName());
Expand Down
Loading