[ 
https://issues.apache.org/jira/browse/BEAM-7269?focusedWorklogId=241226&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-241226
 ]

ASF GitHub Bot logged work on BEAM-7269:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 13/May/19 18:46
            Start Date: 13/May/19 18:46
    Worklog Time Spent: 10m 
      Work Description: lukecwik commented on issue #8555: [BEAM-7269] remove 
StateSpec from hashCode of SimpleStateTag
URL: https://github.com/apache/beam/pull/8555#issuecomment-491940564
 
 
   A coder already has a method to return a value which implements equality 
without encoding the actual value (that is what 
[consistentWithEquals](https://github.com/apache/beam/blob/b6f22efe9302f4e91d8d1eaf5a847f99ff33e2bf/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java#L250)
 and 
[structuralValue](https://github.com/apache/beam/blob/b6f22efe9302f4e91d8d1eaf5a847f99ff33e2bf/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/Coder.java#L249)
 is about). While other coders like 
[ByteArrayCoder](https://github.com/apache/beam/blob/b6f22efe9302f4e91d8d1eaf5a847f99ff33e2bf/sdks/java/core/src/main/java/org/apache/beam/sdk/coders/ByteArrayCoder.java#L122)
 just return an equivalence wrapper around the object.
   
   It is worth it because people will hit correctness issues otherwise around 
missing/wrong values stored in user state.
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 241226)
    Time Spent: 1h 50m  (was: 1h 40m)

> Remove StateSpec from hashCode of SimpleStateTag
> ------------------------------------------------
>
>                 Key: BEAM-7269
>                 URL: https://issues.apache.org/jira/browse/BEAM-7269
>             Project: Beam
>          Issue Type: Bug
>          Components: runner-core
>    Affects Versions: 2.12.0
>            Reporter: Jan Lukavský
>            Assignee: Jan Lukavsky
>            Priority: Major
>             Fix For: 2.14.0
>
>          Time Spent: 1h 50m
>  Remaining Estimate: 0h
>
> SimpleStateTag is used as key in hash based StateTable, and currently is 
> hashes and compares StateSpec and StructuredId, that are inside the 
> SimpleStateTag. StateSpec hashes Coder into the resulting hashCode and when 
> the Coder fails to have a proper hashCode and equals implementations, it 
> results in wrong behavior (apparently missing states).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to