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

Problem with Race between TimerListener initialization and timers fired from init()

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.1
    • Component/s: container
    • Labels:
      None

      Description

      There are use cases where a Task reads from a rocksDB table in its init and sets timers.
      The problem is the TimerListener is initialized later in the task-initialization flow. 
      This causes problems because invocations corresponding to timestamps in the past get ignored.

      One job is using this timer to issue re-transmissions to kafka (after reading the re-transmission list from rocksDB). 
      So currently, on container-failoer, some of their retransmissions get ignored.

      Current hacky-fix is to add a 2-second offset to the timer-timestamps to try and ensure task-init and timerlistener completes before the timers-invocation.

        Attachments

          Activity

            People

            • Assignee:
              xinyu Xinyu Liu
              Reporter:
              rayman7718 Rayman
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: