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

[#32064][prism] Keep elements heap in sequence order. #32065

Merged
merged 1 commit into from
Aug 2, 2024

Conversation

lostluck
Copy link
Contributor

@lostluck lostluck commented Aug 2, 2024

Add a sequence field to elements so that elements with the same timestamp, (and typically, in the same key and and from the same bundle), retain their order within a key.

This wouldn't be required if the sort in the heap package were stable, outside of the heap invariant.

The allows the Java validate runner PerKeyOrderingTests to pass.

Fixes #32064.


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
Copy link
Contributor Author

lostluck commented Aug 2, 2024

R: @damondouglas

Copy link
Contributor

github-actions bot commented Aug 2, 2024

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

@lostluck lostluck changed the title [#32064] Keep elements heap in sequence order. [#32064][prism] Keep elements heap in sequence order. Aug 2, 2024
@@ -688,6 +697,7 @@ func reElementResiduals(residuals []Residual, inputInfo PColInfo, rb RunBundle)
pane: pn,
elmBytes: elmBytes,
keyBytes: keyBytes,
sequence: len(unprocessedElements),
Copy link
Contributor

Choose a reason for hiding this comment

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

Non-blocking. I know that len has an O(1) but just curious why not just for i, w := range ws { sequence: i }?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because that would be sequencing per window, (degenerate case, all 0) rather than by the whole residual set.

Copy link
Contributor

@damondouglas damondouglas left a comment

Choose a reason for hiding this comment

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

@lostluck LGTM

@lostluck lostluck merged commit bf42a81 into apache:master Aug 2, 2024
6 checks passed
@lostluck lostluck deleted the beam32064 branch August 2, 2024 21:12
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.

[prism] Java PerKeyOrderingTest - test failures (per key order not maintained)
2 participants