[GrowableOffsetRangeTracker] Use UnsignedLong instead of BigDecimal to calculate progress#35561
Conversation
…eTracker since the difference between two offsets does not exceed the maximum value of the unsigned representation.
|
Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment |
|
assign set of reviewers |
|
Assigning reviewers: R: @kennknowles for label java. Note: If you would like to opt out of this review, comment Available commands:
The PR bot will only process comments in the main thread (not review comments). |
|
Reminder, please take a look at this pr: @kennknowles |
|
I'm going to kick the tests a few times, but if the failures are real can you take a look? |
|
next action author |
|
Reminder, please take a look at this pr: @kennknowles |
|
Run Java_IOs_Direct PreCommit |
|
Hi @kennknowles, can you review when you get a chance? Thanks! |
|
Reminder, please take a look at this pr: @kennknowles |
|
Assigning new set of reviewers because Pr has gone too long without review. If you would like to opt out of this review, comment R: @robertwb for label java. Available commands:
|
sjvanrossum
left a comment
There was a problem hiding this comment.
@kennknowles tests are passing (flakes).
|
Reminder, please take a look at this pr: @robertwb |
Use unsigned integer math to calculate differences between range start, consumed and estimated end positions. The difference between two values does not exceed the maximum value of unsigned longs so BigDecimal isn't strictly necessary here. For high volume consumption in KafkaIO this reduces CPU time spent in RestrictionTracker.getProgress by ~30x.
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
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, commentfixes #<ISSUE NUMBER>instead.CHANGES.mdwith noteworthy changes.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)
See CI.md for more information about GitHub Actions CI or the workflows README to see a list of phrases to trigger workflows.