[ 
https://issues.apache.org/jira/browse/FLINK-6869?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16042720#comment-16042720
 ] 

ASF GitHub Bot commented on FLINK-6869:
---------------------------------------

Github user tzulitai commented on the issue:

    https://github.com/apache/flink/pull/4090
  
    One caveat that this PR does not yet fully fix:
    the deserialization of the anonymous class serializers 
(`CaseClassSerializer` and `TraversableSerializer`), even with the 
`serialVersionUID` specified, can still fail because there is no guarantee of 
the generated classname of anonymous classes (it depends on the order of when 
the anonymous classes were instantiated, and format seems to also change across 
compilers).
    
    At this moment, I've hit a bit of a wall trying to resolve this. The 
problem was always there pre-1.3, as if users simply change the order of their 
Scala type serializer generation (simply changing call order of 
`createTypeInformation` for their Scala types), the classnames would change and 
they wouldn't be able to restore state.


> Scala serializers do not have the serialVersionUID specified
> ------------------------------------------------------------
>
>                 Key: FLINK-6869
>                 URL: https://issues.apache.org/jira/browse/FLINK-6869
>             Project: Flink
>          Issue Type: Bug
>          Components: Scala API, Type Serialization System
>    Affects Versions: 1.3.0
>            Reporter: Tzu-Li (Gordon) Tai
>            Assignee: Tzu-Li (Gordon) Tai
>            Priority: Blocker
>              Labels: flink-rel-1.3.1-blockers
>             Fix For: 1.3.1
>
>
> Currently, all Scala serializers, e.g. {{OptionSerializer}}, 
> {{CaseClassSerializer}}, {{TrySerializer}} etc. do not have the 
> serialVersionUID specified.
> In 1.3, the Scala serializer (all serializers in general) implementations had 
> to be changed since implementation of the compatibility methods 
> {{snapshotConfiguration}}, {{ensureCompatibility}} had to be implemented, 
> resulting in a new serialVersionUID.
> This means that when restoring from a snapshot pre-1.3 that contains Scala 
> types as state, the previous serializer in the snapshot cannot be 
> deserialized (due to UID mismatch).
> To fix this, we should specify the serialVersionUIDs of the Scala serializers 
> to be what they originally were pre-1.3. This would then allow users with 
> Scala types as state to restore from older versions.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

Reply via email to