You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2019/02/27 20:34:48 UTC

[GitHub] igalshilman opened a new pull request #7852: [FLINK-11773][core] Harden KryoSerializerSnapshot

igalshilman opened a new pull request #7852: [FLINK-11773][core] Harden KryoSerializerSnapshot
URL: https://github.com/apache/flink/pull/7852
 
 
   This PR builds on top of #7845 .
   
   ## What is the purpose of the change
   
   `KryoSerializerSnapshot` would fail in `readSnapshot` if a previously registered `Kryo` type is not accessible by the restored job anymore (either removed from the classpath, or failed to load for some other reason)
   
   The source of this behaviour is an early return at [1], which would skip the consumption at [2] 
    
    [1] https://github.com/apache/flink/blob/cf7b86de436c8714414f563e8637ceb36ea7aabe/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerSnapshotData.java#L310
   
   [2] https://github.com/apache/flink/blob/cf7b86de436c8714414f563e8637ceb36ea7aabe/flink-core/src/main/java/org/apache/flink/api/java/typeutils/runtime/kryo/KryoSerializerSnapshotData.java#L314
   
   ## Brief change log
   * The first two commits are from  #7845 and they are used by 3224e60 (KryoSnapshotTest)
   * 2b95d56 adds an `LinkedOptionalMapSerializer` to robustly read/write `LinkedOptionalMaps`
   * b4b47ef uses `LinkedOptionalMapSerializer` by `KryoSnapshotData` and `PojoSnapshotData`
   
   ## Verifying this change
   
   * A new unit test for `KryoSerializerSnapshot` was introduced.
   
   This change added tests and can be verified as follows:
   
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): (yes / **no**)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (yes / **no**)
     - The serializers: (**yes** / no / don't know)
     - The runtime per-record code paths (performance sensitive): (yes / **no** / don't know)
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
     - The S3 file system connector: (yes / **no** / don't know)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? (yes / **no**)
     - If yes, how is the feature documented? (**not applicable** / docs / JavaDocs / not documented)
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services