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

[#31438] Trigger Precusor work for Prism. #33763

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

lostluck
Copy link
Contributor

Mostly locking in some fixes and work to avoid making Triggers impossible to review.
This PR has 3 components.

  • Adds the bulk of the Trigger State Machine to be used in a different PR.
    • Excludes handling Processing Time, and Merging Windows at this time.
    • https://s.apache.org/beam-triggers for general handling.
    • Checked understanding against the Java TriggerStateMachine code which supports execution for Java runners.
    • Compressed the logic into less abstract form, and simplified shouldFire and Fire handling into a single isReady tree.
    • While it's building on Prism's state handling, it is not getting serialized and deserialized all the time, saving some memory and processing.
  • Fixes a bug WRT state and timer execution: Bundles can't mix timers and data, since there is no ordering guarantee on their processing. Timers or data can be processed first. This is a problem if the other group has later data, avoiding the correctness issue.
    • Fixed by never mixing Data and Timers in the same bundle.
  • Works around a legacy bug in Java's TestStream encodings where a value will be encoded with the deprecated "Outer" context, which leads to dropping length prefixes in the String encoder.
    • This mostly allows additional ValidatesRunner tests to pass and execute, critical for Trigger testing.

Part of #31438.

Actual use of the StateMachine will occur in a subsequent PR. Keeping the commented out debug prints for the time being.


Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:

  • Mention the appropriate issue in your description (for example: addresses #123), if applicable. This will automatically add a link to the pull request in the issue. If you would like the issue to automatically close on merging the pull request, comment fixes #<ISSUE NUMBER> instead.
  • Update CHANGES.md with noteworthy changes.
  • If this contribution is large, please file an Apache Individual Contributor License Agreement.

See the Contributor Guide for more tips on how to make review process smoother.

To check the build health, please visit https://github.com/apache/beam/blob/master/.test-infra/BUILD_STATUS.md

GitHub Actions Tests Status (on master branch)

Build python source distribution and wheels
Python tests
Java tests
Go tests

See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.

@lostluck lostluck changed the title [#31438] Trigger Precusor work [#31438] Trigger Precusor work for Prism. Jan 25, 2025
@lostluck
Copy link
Contributor Author

Copy link
Contributor

Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control. If you'd like to restart, comment assign set of reviewers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant