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

[Processor] Do not close kafka connection if workers are terminated #3159

Merged
merged 1 commit into from
Feb 6, 2024

Conversation

rokatyy
Copy link
Contributor

@rokatyy rokatyy commented Feb 5, 2024

This PR addresses a bug where some messages were processed twice after a function restart. The issue arose because, after sending a termination signal, all workers were marked as terminated. Subsequently, when the ConsumeClaim function attempted to allocate a worker, it encountered an error, causing the consumption loop to break and, consequently, halting the explicitAckHandler. As a result, the processor side could no longer respond to control messages from the runtime side, as evidenced in the log with the message: "Failed to read control message","more":{"errRootCause":"EOF"}}.

This PR modifies this behavior so that the consumption loop does not break upon receiving the ErrAllWorkersAreTerminated error.

Jira - https://jira.iguazeng.com/browse/NUC-139

Copy link
Contributor

@TomerShor TomerShor left a comment

Choose a reason for hiding this comment

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

Looks good!
Termination will cause the processor to exit anyways so this nop loop won't hurt anyone 😎

@rokatyy rokatyy marked this pull request as ready for review February 5, 2024 12:34
@TomerShor TomerShor merged commit 4480c03 into nuclio:development Feb 6, 2024
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants