Weiqing Yang created FLINK-40297:
------------------------------------

             Summary: Route TTL-aware value migration through the 
TypeSerializerSnapshot migrate hook
                 Key: FLINK-40297
                 URL: https://issues.apache.org/jira/browse/FLINK-40297
             Project: Flink
          Issue Type: Sub-task
          Components: Runtime / State Backends
            Reporter: Weiqing Yang


TtlAwareSerializer.migrateValueFromPriorSerializer is the single entry point 
through which the RocksDB state backend migrates state values on restore: 
AbstractRocksDBState, RocksDBListState and RocksDBMapState all call it. Today 
it deserializes with the prior serializer and re-serializes with the new one, 
with no opportunity for a serializer to adapt the value.

This changes it to unwrap the prior value to its bare (non-TTL) form, pass it 
through migrate on the inner value serializer's snapshot, and re-wrap it, 
preserving the prior TTL timestamp when the prior value carried one.

Behavior is unchanged: migrate defaults to identity, so every existing state 
type migrates exactly as before. The change makes the hook reachable so that a 
serializer overriding it takes effect.

Depends on FLINK-40296.

FLIP-527: 
https://cwiki.apache.org/confluence/spaces/FLINK/pages/353601981/FLIP-527+State+Schema+Evolution+for+RowData



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to