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

Yan Fang updated SAMZA-258:
---------------------------

    Attachment: SAMZA-258.1.patch

moved the clock() above storageManage.flush. Passed unit test and wikipedia 
test.

> task.window.ms is inaccurate
> ----------------------------
>
>                 Key: SAMZA-258
>                 URL: https://issues.apache.org/jira/browse/SAMZA-258
>             Project: Samza
>          Issue Type: Bug
>    Affects Versions: 0.6.0
>            Reporter: Chris Riccomini
>            Assignee: Yan Fang
>             Fix For: 0.7.0, 0.8.0
>
>         Attachments: SAMZA-258.1.patch, SAMZA-258.patch
>
>
> When running a WindowableTask with a long pause during the window() call, the 
> task.window.ms does not reflect how often window() is called.
> If task.window.ms is set to 250ms, and the window() method takes 100ms, you 
> would expect the window() method to be invoked 4 times per second. In fact, 
> it's only invoked 3 times per second:
> {noformat}
> 100ms (window) + 250ms (process) + 100ms (window) + 250ms (process) + 100ms 
> (window) + 250ms (process) = 1050ms
> {noformat}
> The reason for this is that we reset the window timer AFTER window() returns:
> {code}
>     if (isWindowableTask && windowMs >= 0 && lastWindowMs + windowMs < 
> clock()) {
>       task.asInstanceOf[WindowableTask].window(collector, coordinator)
>       lastWindowMs = clock()
>     }
> {code}
> I think we just need to move lastWindowMs above the window() call.
> We should do this for task.commit.ms as well.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to