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] Add a control message to inform the processor that draining is done #3153

Merged
merged 8 commits into from
Feb 4, 2024

Conversation

rokatyy
Copy link
Contributor

@rokatyy rokatyy commented Feb 1, 2024

At present, we lack a signaling mechanism to notify the processor when draining is complete. Currently, the processor relies on a timeout, which is not the most efficient approach. Even if draining takes less than a second, we still wait for around 10 seconds.

To address this issue, we are introducing a new control message - DrainDoneMessageKind. This message allows the wrapper to inform the processor when draining is done.

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

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.

Nice work, added some comments below.
It would be nice to see how does it improve the drain flow.
Also, a test verified that it was called could also be good - perhaps by checking function logs?

pkg/processor/runtime/python/py/_nuclio_wrapper.py Outdated Show resolved Hide resolved
pkg/processor/runtime/python/py/_nuclio_wrapper.py Outdated Show resolved Hide resolved
pkg/processor/runtime/python/py/_nuclio_wrapper.py Outdated Show resolved Hide resolved
pkg/processor/runtime/python/py/_nuclio_wrapper.py Outdated Show resolved Hide resolved
pkg/processor/worker/worker.go Outdated Show resolved Hide resolved
pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
@rokatyy rokatyy marked this pull request as ready for review February 1, 2024 15:16
pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
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.

Nicely done 👌
only one minor comment

pkg/processor/trigger/kafka/test/kafka_test.go Outdated Show resolved Hide resolved
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.

Good job 👍
only a minor comment change but approved

pkg/processor/runtime/rpc/abstract.go Outdated Show resolved Hide resolved
@TomerShor TomerShor merged commit 49d7056 into nuclio:development Feb 4, 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