You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Israel Herraiz (Jira)" <ji...@apache.org> on 2022/03/13 22:07:00 UTC

[jira] [Updated] (BEAM-14093) OffsetRestrictionTracker calculates wrongly the tryClaim conditions

     [ https://issues.apache.org/jira/browse/BEAM-14093?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Israel Herraiz updated BEAM-14093:
----------------------------------
    Fix Version/s: Not applicable
       Resolution: Invalid
           Status: Resolved  (was: Triage Needed)

It turns out you can chain comparisons in Python: https://www.geeksforgeeks.org/chaining-comparison-operators-python/

> OffsetRestrictionTracker calculates wrongly the tryClaim conditions
> -------------------------------------------------------------------
>
>                 Key: BEAM-14093
>                 URL: https://issues.apache.org/jira/browse/BEAM-14093
>             Project: Beam
>          Issue Type: Bug
>          Components: io-py-common
>    Affects Versions: 2.37.0
>            Reporter: Israel Herraiz
>            Assignee: Israel Herraiz
>            Priority: P1
>             Fix For: Not applicable
>
>
> The OffsetRestrictionTracker method tryClaim tries to calculate if the claim can be done using this condition:
> {code:python}
> if self._range.start <= position < self._range.stop:
>   self._current_position = position
>   return True{code}
> The condition should be
> {code:python}
> if self._range.start <= position and position < self._range.stop:
>   self._current_position = position
>   return True{code}
> This affects the correctness of the claims for SplittableDoFns.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)