Skip to content

Conversation

@pabloem
Copy link
Member

@pabloem pabloem commented Apr 8, 2019

What is odd about this problem is that:

  • We would expect the timer set to 100 to fire when the watermark advances to 100 - but instead, it fires together with the timer set to 1000 when the watermark advances to infinity.

On the other hand, if we set advance_watermark_to(101), the test behaves properly without any need for modifications.

BUT, what's even more odd is that when doing the actual check in trigger.py as to whether the timer should be fired, we do check for <=. Strange.:
https://github.com/apache/beam/blob/master/sdks/python/apache_beam/transforms/trigger.py#L1273

Nonetheless, this change does fix the new test (which was previously failing) - and I believe it does correct the behavior. So. Yes.

I'll keep hunting for bugs.

r: @aaltay
cc: @tweise

| beam.ParDo(BagStateClearingStatefulDoFn())
| beam.ParDo(self.record_dofn()))

self.assertEqual(
Copy link
Member

Choose a reason for hiding this comment

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

Is it possible to check whether emit_values fired or not at all?

Copy link
Member Author

Choose a reason for hiding this comment

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

I've added a check for that. Thanks!

@aaltay aaltay merged commit 476e75e into apache:master Apr 9, 2019
@pabloem pabloem deleted the fix-timer branch April 10, 2019 00:43
ibzib pushed a commit to ibzib/beam that referenced this pull request Apr 22, 2019
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.

2 participants