You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "Cameron Lee (JIRA)" <ji...@apache.org> on 2018/12/11 23:11:00 UTC

[jira] [Created] (SAMZA-2039) When TaskCallbackImpl.failure is called due to timeout, interrupt is called on the current thread

Cameron Lee created SAMZA-2039:
----------------------------------

             Summary: When TaskCallbackImpl.failure is called due to timeout, interrupt is called on the current thread
                 Key: SAMZA-2039
                 URL: https://issues.apache.org/jira/browse/SAMZA-2039
             Project: Samza
          Issue Type: Improvement
            Reporter: Cameron Lee


When TaskCallbackImpl.failure is called, the scheduledFuture in the TaskCallbackImpl object gets cancelled. However, in the failure case of hitting the task callback timeout, then it is the scheduledFuture that is calling TaskCallbackImpl.failure. Therefore, the scheduledFuture is calling cancel on itself. This may impact the execution of the thread if the interrupted status is ever checked. For example, StreamAppender uses a BlockingQueue to store messages, but that will check if the thread is interrupted and not handle the "append" correctly. Once a thread interrupted state is checked, it gets cleared, so further execution is not impacted, but it still causes some odd and hard-to-track behavior.

Since we want the scheduledFuture to run in the timeout case, it should not cancel itself.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)