seungjoo-choi-bucketplace commented on code in PR #29149:
URL: https://github.com/apache/flink/pull/29149#discussion_r3990920448


##########
flink-state-backends/flink-statebackend-forst/src/main/java/org/apache/flink/state/forst/ForStDBTtlCompactFiltersManager.java:
##########
@@ -178,7 +209,7 @@ public void configCompactFilter(
             }
 
             FlinkCompactionFilter.Config config;
-            if (stateDesc instanceof ListStateDescriptor) {
+            if (isListState) {

Review Comment:
   Good catch, thanks — you're right: the V2 `ListStateDescriptor` carries the 
element serializer itself (`TtlSerializer<E>` for a TTL state), so the unwrap 
only applies to V1.
   
   Fixed in 1c897c3a: the V1 overload unwraps the `ListSerializer`, the V2 
overload passes the registered serializer through as the element serializer 
(which matches how `ForStListState` stores the elements via 
`ListDelimitedSerializer`), and `ForStTtlCompactFilterTest` now covers a V2 
`ListState` for both variable-length (element filter) and fixed-length 
elements. Both new tests fail on the previous revision with exactly this 
`ClassCastException`.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to