reef-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sergiy Matusevych (JIRA)" <>
Subject [jira] [Commented] (REEF-1537) LogicalTimer can cause a race condition in RuntimeClock
Date Mon, 20 Mar 2017 22:12:41 GMT


Sergiy Matusevych commented on REEF-1537:

[~shouhengyi] thanks for looking at it! {{RuntimeClockTest.testAlarmOrder()}} uses {{RealTimer}}
exactly because if it uses {{LogicalTimer}} instead, it would still depend on system clock
(because of {{.wait()}} call). A proper fix would be to get rid of system clock dependency
completely inside of the {{RuntimeClock}} - but I would not do it in this release as it is
a small but fundamental change. I would rather focus on the cleanup and Spark integration
now, and get back to the clock problem after 0.16

> LogicalTimer can cause a race condition in RuntimeClock
> -------------------------------------------------------
>                 Key: REEF-1537
>                 URL:
>             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

View raw message