[
https://issues.apache.org/jira/browse/BEAM-7520?focusedWorklogId=298935&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-298935
]
ASF GitHub Bot logged work on BEAM-7520:
----------------------------------------
Author: ASF GitHub Bot
Created on: 21/Aug/19 19:30
Start Date: 21/Aug/19 19:30
Worklog Time Spent: 10m
Work Description: kennknowles commented on pull request #9190:
[BEAM-7520] Fix timer firing order in DirectRunner
URL: https://github.com/apache/beam/pull/9190#discussion_r316363962
##########
File path:
runners/direct-java/src/main/java/org/apache/beam/runners/direct/CommittedResult.java
##########
@@ -18,10 +18,10 @@
package org.apache.beam.runners.direct;
import com.google.auto.value.AutoValue;
+import java.util.Optional;
Review comment:
Yes, that is exactly the logic I am familiar with. We've also had healthy
discussions in Beam and seemingly every project. I can't escape null! I share
the "null was a mistake, never really made sense in the first place, and should
be eliminated from languages" perspective. I believe basic good programming
practice to program as though it does not actually exist, except when necessary
for compatibility or performance. Using `@Nullable` and `@NonNull` with an
extended type checker is a compromise when necessary.
I have not seen any actual evidence for the claim that it causes performance
problems. I would easily believe it - It is true that Java is exceptionally
inefficient w.r.t. trivial wrappers unless they are well-optimized. But on the
thread you linked the only person who brought up real performance said that
they could not detect any difference except when _serializing_ it in
performance-sensitive paths. So perhaps Java isn't so inefficient at optimizing
it away after all.
In any event, please make it a separate change. You can do a bulk change in
the codebase if you like. At this point, I am just so tired of this issue which
humans are still stuck on that I will let most anything through :-/
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 298935)
Time Spent: 8h 20m (was: 8h 10m)
> DirectRunner timers are not strictly time ordered
> -------------------------------------------------
>
> Key: BEAM-7520
> URL: https://issues.apache.org/jira/browse/BEAM-7520
> Project: Beam
> Issue Type: Bug
> Components: runner-direct
> Affects Versions: 2.13.0
> Reporter: Jan Lukavský
> Assignee: Jan Lukavský
> Priority: Major
> Time Spent: 8h 20m
> Remaining Estimate: 0h
>
> Let's suppose we have the following situation:
> - statful ParDo with two timers - timerA and timerB
> - timerA is set for window.maxTimestamp() + 1
> - timerB is set anywhere between <windowStart, windowEnd), let's denote that
> timerB.timestamp
> - input watermark moves to BoundedWindow.TIMESTAMP_MAX_VALUE
> Then the order of timers is as follows (correct):
> - timerB
> - timerA
> But, if timerB sets another timer (say for timerB.timestamp + 1), then the
> order of timers will be:
> - timerB (timerB.timestamp)
> - timerA (BoundedWindow.TIMESTAMP_MAX_VALUE)
> - timerB (timerB.timestamp + 1)
> Which is not ordered by timestamp. The reason for this is that when the input
> watermark update is evaluated, the WatermarkManager,extractFiredTimers() will
> produce both timerA and timerB. That would be correct, but when timerB sets
> another timer, that breaks this.
--
This message was sent by Atlassian Jira
(v8.3.2#803003)