minxhe commented on code in PR #29149:
URL: https://github.com/apache/flink/pull/29149#discussion_r3990683419
##########
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:
V2 ListState passes a `TtlSerializer<E>` directly, not a
`ListSerializer<TtlValue<E>>`, so the new V2 call reaches an invalid cast:
``` java
((ListSerializer<?>) stateSerializer) // stateSerializer is TtlSerializer<E>
```
This introduces a `ClassCastException` during TTL-enabled V2 ListState
creation. Could we use the serializer directly for V2, unwrap it only for V1,
and add a V2 ListState regression test?
--
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]