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

generic_lookup_actor: add basic error handling #9396

Merged
merged 3 commits into from
Oct 11, 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
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,17 @@ class TInputTransformStreamLookupBase
private: //events
STRICT_STFUNC(StateFunc,
hFunc(IDqAsyncLookupSource::TEvLookupResult, Handle);
hFunc(IDqComputeActorAsyncInput::TEvAsyncInputError, Handle);
)

void Handle(IDqComputeActorAsyncInput::TEvAsyncInputError::TPtr ev) {
auto evptr = ev->Get();
Send(ComputeActorId, new IDqComputeActorAsyncInput::TEvAsyncInputError(
InputIndex,
evptr->Issues,
evptr->FatalCode));
}

void AddReadyQueue(NUdf::TUnboxedValue& lookupKey, NUdf::TUnboxedValue& inputOther, NUdf::TUnboxedValue *lookupPayload) {
NUdf::TUnboxedValue* outputRowItems;
NUdf::TUnboxedValue outputRow = HolderFactory.CreateDirectArrayHolder(OutputRowColumnOrder.size(), outputRowItems);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,14 @@ namespace NYql::NDq {
FinalizeRequest();
}

void Handle(TEvError::TPtr) {
FinalizeRequest();
void Handle(TEvError::TPtr ev) {
auto actorSystem = TActivationContext::ActorSystem();
auto error = ev->Get()->Error;
uzhastik marked this conversation as resolved.
Show resolved Hide resolved
auto errEv = std::make_unique<IDqComputeActorAsyncInput::TEvAsyncInputError>(
-1,
NConnector::ErrorToIssues(error),
NConnector::ErrorToDqStatus(error));
actorSystem->Send(new NActors::IEventHandle(ParentId, SelfId(), errEv.release()));
}

void Handle(NActors::TEvents::TEvPoison::TPtr) {
Expand Down
Loading