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

[Bug]: Periodic sequence never updates the watermark #23763

Closed
damccorm opened this issue Oct 20, 2022 · 3 comments · Fixed by #23507
Closed

[Bug]: Periodic sequence never updates the watermark #23763

damccorm opened this issue Oct 20, 2022 · 3 comments · Fixed by #23507
Assignees
Labels
bug core done & done Issue has been reviewed after it was closed for verification, followups, etc. P2 python

Comments

@damccorm
Copy link
Contributor

What happened?

Right now, if you have a streaming job with periodic impulse as your source, the watermark will not get updated until the periodic impulse completes.

This means that if you have something like:

pipeline
| PeriodicImpulse(time.now(), time.now()+1000000, 1)
| beam.Map(do_stuff)
| beam.WindowInto(window.FixedWindows(2))
| beam.combiners.Count.PerElement()
| beam.Map(log_output)

the pipeline will hang indefinitely and never log anything. If we properly emitted watermarks, it would log output every 2 seconds.

Issue Priority

Priority: 2

Issue Component

Component: sdk-py-core

@Abacn
Copy link
Contributor

Abacn commented Oct 20, 2022

Wondering if this is the cause of #22776

@damccorm
Copy link
Contributor Author

damccorm commented Oct 20, 2022

Scratch that (ignore my previous now deleted comment). This seems to fix the problem; I was able to successfully drain a pipeline with my updated periodic sequence code.

@damccorm
Copy link
Contributor Author

damccorm commented Oct 20, 2022

Scratch that - my original analysis was right and we need to explicitly truncate. The drain I thought I saw was actually just my test framework cancelling the job 😳 Explicitly truncating works perfectly though, I'll put up a PR for that shortly.

EDIT - #23765

@github-actions github-actions bot added this to the 2.44.0 Release milestone Nov 4, 2022
@tvalentyn tvalentyn added the done & done Issue has been reviewed after it was closed for verification, followups, etc. label Nov 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug core done & done Issue has been reviewed after it was closed for verification, followups, etc. P2 python
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants