Uploaded image for project: 'Samza'
  1. Samza
  2. SAMZA-2039

When TaskCallbackImpl.failure is called due to timeout, interrupt is called on the current thread

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            cameronlee Cameron Lee
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: