-
Notifications
You must be signed in to change notification settings - Fork 961
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
Fix ERROR Graceful stop of task failed #1360
Comments
Hello @gharris1727 Thanks for the reply. IMHO, #1348 did not cause the "Graceful stop of task failed". I did some tracing today and could clearly see the task logging every 100ms that was waiting for the next On a side note, all the merit goes to you, as you pointed the issue in the kafka mailing list when I submitted this same question. Finally, what is puzzling me is that there is a test which, apparently, checks if a task can be started/stopped by the same thread. But I'm still trying to understand in details if the test is missing something. |
The testStartStopSameThread doesn't catch the scenario of this issue because it tests only starting and stoping. It doesn't cover the scenario where the I think a more complete test would be:
@C0urante 's original suggestion in #677 would do the trick. However, I don't know how to implement this other than spawning a separate thread in |
Maybe it would be possible to simply to replace this if with:
Idea is to, if this task needs to sleep, we actually return an empty list (don't return null cause I guess that's to signal a pause?). Thoughts? |
@robsonhermes : was that resolved since? if not, how did you workaround it? |
Hello @papaya-daniel |
…aximum duration time for the poll operation
Hi, I've opened a PR with the proposed solution for this problem. |
Can someone have a look at my PR ? |
@jakubmalek , will take a look next week, thanks! |
This is a new issue and not exactly the same as #677
I'm facing this error whenever stoping my JDBC connectors. Got in touch with Kafka connect users and they explained is most likely caused by: https://issues.apache.org/jira/browse/KAFKA-15090
Since this change, the stop signal in invoked in the same thread as the dedicated thread for the task. This results in the
JdbcSourceTask
to only process thestop()
signal when it returns from the currentpoll()
.Basically it means this change in kafka connect made the change of #677 stop reaching the goal of that change.
On my case, we are using kafka connect and JDBC source/sink to move large amounts of data around, once per day. Waiting for the next
poll()
returning to be able to cleanly stop tasks is not really an option.I'd guess the required change would be to implement the
poll()
in some sort of non blocking way, but I admit not quite sure how to implement it.The text was updated successfully, but these errors were encountered: