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

Run stop() in the StreamProcessor in the same thread as other events.

    XMLWordPrintableJSON

Details

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

    Description

      stop() should be running in the same thread as other events. Since sometimes it is invoked form the container thread, it may end up running at the same time as another event from ZK.
      Even, if one of the first things stop() does is stopping the scheduler, an event still may be running. So the solution would be to call the stop () from JobCoordinator, using the same debouncing thread as every other event. It will do the following:

      • Cancel all the currently en-queued tasks. It still may have one task running.
      • Schedule itself (stop()) on the same debounce thread.

      Note. Since we are using scheduler's thread to run stop(), we won't be able to run scheduler.stop(). But that should be fine, since it is a daemon thread.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              boryas Boris Shkolnik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: