Apache S4
  1. Apache S4
  2. S4-63

onTime() events are not synchronized correctly

    Details

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

      Description

      onTime() events are executed by a separate thread and are not synchronized correctly with the rest of events, since ProcessingElement.OnTimerTask's run() method synchronizes on "this" (the thread object) instead of the PE instance.

      1. S4-63-synchronize-onTime-events.patch
        9 kB
        Daniel Gómez Ferro
      2. S4-63-synchronize-onTime-events.patch
        9 kB
        Daniel Gómez Ferro
      3. 0001-Fix-timers-synchronization.patch
        10 kB
        Daniel Gómez Ferro
      4. 0001-Fix-timers-synchronization.patch
        10 kB
        Daniel Gómez Ferro

        Issue Links

          Activity

          Hide
          Daniel Gómez Ferro added a comment -

          This patch fixes the synchronization issue and adds a test case to guard against regressions.

          I'm adding a dependency on Mockito for tests, and I'm adding a couple of void modules (BareCoreModule, BareCommModule) to make it easy to test components without the Comm layer.

          Show
          Daniel Gómez Ferro added a comment - This patch fixes the synchronization issue and adds a test case to guard against regressions. I'm adding a dependency on Mockito for tests, and I'm adding a couple of void modules (BareCoreModule, BareCommModule) to make it easy to test components without the Comm layer.
          Hide
          Daniel Gómez Ferro added a comment -

          Grant license to ASF

          Show
          Daniel Gómez Ferro added a comment - Grant license to ASF
          Hide
          Matthieu Morel added a comment -

          +1

          This is great, and we'll definitely take advantage of the mock modules that were added in tests.

          I'll integrate this as soon as I can.

          Thanks Daniel!

          Show
          Matthieu Morel added a comment - +1 This is great, and we'll definitely take advantage of the mock modules that were added in tests. I'll integrate this as soon as I can. Thanks Daniel!
          Hide
          Matthieu Morel added a comment -

          Unfortunately the script is not formatted through "git format-patch" and I cannot apply it directly either. Daniel, can you recreate the patch with "git format-patch" ? Thanks!

          Show
          Matthieu Morel added a comment - Unfortunately the script is not formatted through "git format-patch" and I cannot apply it directly either. Daniel, can you recreate the patch with "git format-patch" ? Thanks!
          Hide
          Daniel Gómez Ferro added a comment -

          Patch recreated with format-patch

          Show
          Daniel Gómez Ferro added a comment - Patch recreated with format-patch
          Hide
          Daniel Gómez Ferro added a comment -

          Used --no-prefix last time.

          Show
          Daniel Gómez Ferro added a comment - Used --no-prefix last time.
          Show
          Matthieu Morel added a comment - merged in piper https://git-wip-us.apache.org/repos/asf?p=incubator-s4.git;a=commit;h=b712f9cf Thanks Daniel!

            People

            • Assignee:
              Unassigned
              Reporter:
              Daniel Gómez Ferro
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development