You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "davidradl (via GitHub)" <gi...@apache.org> on 2025/06/10 11:10:27 UTC

Re: [PR] [FLINK-37294][state] Support state migration between disabling and enabling ttl in HeapKeyedStateBackend [flink]

davidradl commented on code in PR #26651:
URL: https://github.com/apache/flink/pull/26651#discussion_r2137615225


##########
flink-runtime/src/main/java/org/apache/flink/runtime/state/heap/AbstractHeapState.java:
##########
@@ -112,6 +115,29 @@ public byte[] getSerializedValue(
         return KvStateSerializer.serializeValue(result, safeValueSerializer);
     }
 
+    public SV migrateValueForTtlStateMigration(
+            SV state,
+            TypeSerializer<SV> priorSerializer,
+            TypeSerializer<SV> newSerializer,
+            TtlTimeProvider ttlTimeProvider) {
+
+        Preconditions.checkArgument(priorSerializer instanceof TtlAwareSerializer);

Review Comment:
   nit: in the variable names we use  prior and new and previous and current. I suggest being consistent; 
   previousSerializer previousAwareSerializer
   currentSerializer currentTtlAwareSerializer



-- 
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.

To unsubscribe, e-mail: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org