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
[BEAM-10486] Update OffsetRestrictionTracker to honor failed claim attempt marking the claim as done when checkpointing. #12260
Conversation
…tempt marking the claim as done when checkpointing. Also fix check_done being implicitly done for empty ranges.
R: @boyuanzz |
@@ -92,7 +92,8 @@ def __init__(self, offset_range): | |||
self._checkpointed = False | |||
|
|||
def check_done(self): | |||
if self._last_claim_attempt < self._range.stop - 1: | |||
if (self._range.start != self._range.stop and | |||
self._last_claim_attempt < self._range.stop - 1): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self._last_claim_attempt
could be None
. You may want to have self._range.start != self._range.stop and (self._last_claim_attemp is None or self._last_claim_attempt < self._range.stop - 1)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
Run Python PreCommit |
Run Python2_PVR_Flink PreCommit |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks.
Run Python PreCommit |
…tempt marking the claim as done when checkpointing. (apache#12260) * [BEAM-10486] Update OffsetRestrictionTracker to honor failed claim attempt marking the claim as done when checkpointing. Also fix check_done being implicitly done for empty ranges. * fixup! Address PR comments
Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
R: @username
).[BEAM-XXX] Fixes bug in ApproximateQuantiles
, where you replaceBEAM-XXX
with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.CHANGES.md
with noteworthy changes.See the Contributor Guide for more tips on how to make review process smoother.
Post-Commit Tests Status (on master branch)
Pre-Commit Tests Status (on master branch)
See .test-infra/jenkins/README for trigger phrase, status and link of all Jenkins jobs.