You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@reef.apache.org by "Sergiy Matusevych (JIRA)" <ji...@apache.org> on 2016/08/22 19:58:20 UTC

[jira] [Updated] (REEF-1537) LogicalTimer can cause a race condition in RuntimeClock

     [ https://issues.apache.org/jira/browse/REEF-1537?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sergiy Matusevych updated REEF-1537:
------------------------------------
    Description: 
{{RuntimeClock}} has a concept of injectable timer, and in many unit tests, we use {{LogicalTimer}} to speed up the operations. Unfortunately, {{RuntimeClock}} still depends on the system timer internally: it uses {{Object.wait(time)}} calls in the event loop. That can cause race conditions when using {{LogicalTimer}}, e.g. in unit test {{ClockTest.testAlarmOrder()}}

The solution would be to move the {{.wait()}} functionality into the logical timer and use that inside the {{RuntimeClock}}.

  was:
{{RuntimeClock}} has a concept of injectable timer, and in many unit tests, we use {{LogicalTimer}} to speed up the operations. Unfortunately, {{RuntimeClock}} still depends on the system timer internally: it uses {{Object.wait(time)}} calls in the event loop. That can cause race conditions when using {{LogicalTimer}}, e.g. in unit test {{ClockTest.testAlarmOrder()}}

The solution would be to move the {{.wait()}} functionality into the logical timer.


> LogicalTimer can cause a race condition in RuntimeClock
> -------------------------------------------------------
>
>                 Key: REEF-1537
>                 URL: https://issues.apache.org/jira/browse/REEF-1537
>             Project: REEF
>          Issue Type: Bug
>          Components: REEF-Common
>            Reporter: Sergiy Matusevych
>            Assignee: Sergiy Matusevych
>            Priority: Minor
>              Labels: race-condition, test
>
> {{RuntimeClock}} has a concept of injectable timer, and in many unit tests, we use {{LogicalTimer}} to speed up the operations. Unfortunately, {{RuntimeClock}} still depends on the system timer internally: it uses {{Object.wait(time)}} calls in the event loop. That can cause race conditions when using {{LogicalTimer}}, e.g. in unit test {{ClockTest.testAlarmOrder()}}
> The solution would be to move the {{.wait()}} functionality into the logical timer and use that inside the {{RuntimeClock}}.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)