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

chore: shutdown when we see non retryable udf errors #165

Merged
merged 1 commit into from
Nov 5, 2024
Merged

Conversation

yhl25
Copy link
Contributor

@yhl25 yhl25 commented Nov 5, 2024

No description provided.

err error
}

resultCh := make(chan recvResult, 1)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need this channel and the goroutine if we put stream.Recv inside select?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We cannot do that since stream.Recv() is a blocking call.

select {
case <-groupCtx.Done():
req, err := recvWithContext(groupCtx, stream)
if errors.Is(err, context.Canceled) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see different behaviour between map and map batchmap above. batchmap is returning the err while map is breaking the outer loop without returning the err. Is this expected? same for map stream.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Batchmap operations are invoked inside a separate function that is the reason we use return.

@vigith vigith merged commit 9bb1608 into main Nov 5, 2024
3 checks passed
@vigith vigith deleted the shutdown branch November 5, 2024 21:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants