tzulitai opened a new pull request #6931: [FLINK-9808] [state-backends] Migrate 
state when necessary
URL: https://github.com/apache/flink/pull/6931
 
 
   ## What is the purpose of the change
   
   This PR is based on #6930. Only the last commit is relevant.
   
   This PR adds the procedure of migrating state (i.e., reading state bytes 
with the restored prior serializer, and then re-writing the deserialized object 
with the new serializer).
   
   - This should only ever occur in the RocksDB state backend, since the 
restore / snapshotting of heap-based backends are already a migration process 
by nature. This is identified by a result of 
`TypeSerializerSchemaCompatibility.compatibleAfterMigration()` on the state 
serializer's compatibility check.
   - For heap-based backends, we only need to check that the new state 
serializer isn't incompatible. This is identified by a result of 
`TypeSerializerSchemaCompatibility.incompatible()` on the state serializer's 
compatibility check.
   
   ## Brief change log
   
   - Add `migrateSerializedValue` to `AbstractRocksDBStateValue`
   - Use the new method to iterate through RocksDB bytes when state migration 
is necessary
   - Adapt heap-based backends to check fail when new serializers are 
incompatible.
   - Add a `StateMigrationTestBase` that verifies serializers are being used as 
expected for a restore procedure
   
   ## Verifying this change
   
   The main new test coverage that covers this is in the 
`StateMigrationTestBase` class.
   
   ## 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:
[email protected]


With regards,
Apache Git Services

Reply via email to