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

Samza onTimer method triggering before init

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.14.1
    • Fix Version/s: None
    • Component/s: container
    • Labels:
      None
    • Environment:

       
       

      Description

      If you create a samza job with an onTimer method, TimerRegistry registers the timer before the container is running. This leads to an edge case where if the initial `registerTimer` delay is too small, the onTimer function will never get called (this can mean you never get to schedule subsequent timers if your onTimer function periodically schedules it's next call).

      I ran into this when setting my timer to schedule onTimer events every 250 milliseconds. One temporary workaround for this is to make the registerTimer function have a high initial delay (e.g. 10 seconds).
       

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                xinyu Xinyu Liu
                Reporter:
                rsylvan Robin Sylvan
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: