Skip to content

Stop the tasks in parallel in AbstractKafkaConnector#853

Merged
vmaheshw merged 2 commits intolinkedin:masterfrom
vmaheshw:fixStopTasks
Sep 28, 2021
Merged

Stop the tasks in parallel in AbstractKafkaConnector#853
vmaheshw merged 2 commits intolinkedin:masterfrom
vmaheshw:fixStopTasks

Conversation

@vmaheshw
Copy link
Copy Markdown
Collaborator

@vmaheshw vmaheshw commented Sep 24, 2021

Currently during container shutdown, the tasks are shutdown sequentially in AbstractKafkaConnector. The shutdown code waits for the task threads to be killed for 60+ sec. This increases the overall stop time, if the kafka producers have a lot pending to flush in scale environment. Ideally all the tasks can be stopped in parallel, similar to when the task assignment changes.

Using the shutdown executor service to stop the tasks. When the executor is stopped, it will force kill the ongoing operations. So, I'm changing the shutdown executor time to be same as the time it waits to stop a task which is currently 75 + 15 = 90 sec.

Copy link
Copy Markdown
Collaborator

@jzakaryan jzakaryan left a comment

Choose a reason for hiding this comment

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

LGTM

@vmaheshw vmaheshw merged commit 11af834 into linkedin:master Sep 28, 2021
vmaheshw added a commit to vmaheshw/brooklin that referenced this pull request Mar 1, 2022
Currently during container shutdown, the tasks are shutdown sequentially in AbstractKafkaConnector. The shutdown code waits for the task threads to be killed for 60+ sec. This increases the overall stop time, if the kafka producers have a lot pending to flush in scale environment. Ideally all the tasks can be stopped in parallel, similar to when the task assignment changes.

Using the shutdown executor service to stop the tasks. When the executor is stopped, it will force kill the ongoing operations. So, I'm changing the shutdown executor time to be same as the time it waits to stop a task which is currently 75 + 15 = 90 sec.
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