Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BEAM-3052] Set end-of-window timer in AfterWatermarkStateMachine #4001

Merged
merged 4 commits into from Oct 16, 2017

Conversation

kennknowles
Copy link
Member

Follow this checklist to help us incorporate your contribution quickly and easily:

  • Make sure there is a JIRA issue filed for the change (usually before you start working on it). Trivial changes like typos do not require a JIRA issue. Your pull request should address just this issue, without pulling in other changes.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Format the pull request title like [BEAM-XXX] Fixes bug in ApproximateQuantiles, where you replace BEAM-XXX with the appropriate JIRA issue.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Run mvn clean verify to make sure basic checks pass. A more thorough check will be performed on your pull request automatically.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

The state machines for the variants of AfterWatermark.pastEndOfWindow() were inconsistent in when they set a timer or not. Since this state machine should be decoupled from whatever context it is being run in, it should set a timer for the time it is interested in.

This is deliberately peeled off #3988 since it is simpler and more definitely correct. The other bits in that PR are under further revision.

R: @bjchambers

Copy link
Contributor

@bjchambers bjchambers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Are there additional tests you can add to prevent future regressions to these?

@kennknowles
Copy link
Member Author

Now that you mention it, yes. The TriggerTester sets this timer unconditionally because the ReduceFnRunner manages it. So removing that should cause some failing test without this change.

@kennknowles
Copy link
Member Author

Added a failing test, checked that it failed without the current change.

@asfgit asfgit merged commit 3d36f63 into apache:master Oct 16, 2017
asfgit pushed a commit that referenced this pull request Oct 16, 2017
…arkStateMachine

  Do not set EOW timer in TriggerStateMachineTester
  Set end-of-window timer in AfterWatermarkStateMachine
  Allow checking timers set in TriggerStateMachineTester
  Return null when timer not found instead of crashing
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 3d36f63 on kennknowles:AfterWatermark-timer into ** on apache:master**.

@kennknowles kennknowles deleted the AfterWatermark-timer branch April 25, 2018 02:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants