Martijn Visser created FLINK-41416:
--------------------------------------
Summary: StateFutureUtils#toIterable throws ClassCastException for
list and map state with TTL
Key: FLINK-41416
URL: https://issues.apache.org/jira/browse/FLINK-41416
Project: Flink
Issue Type: Bug
Components: Runtime / Async State Processing
Affects Versions: 2.3.2, 2.4.0, 2.5.0
Reporter: Martijn Visser
StateFutureUtils#toIterable casts every non-null iterator to
InternalStateIterator. The async TTL wrappers TtlListState.AsyncIteratorWrapper
and TtlMapState.AsyncEntriesIterator don't implement it. So on ForSt with TTL
enabled, toIterable throws a ClassCastException for a non-empty list state and
for every asyncEntries, asyncKeys and asyncValues result. A keyed job with
enableAsyncState(), ForSt and a TTL list state that reads through toIterable
fails on its first non-empty read. Without TTL, or on the heap backend, the
same job finishes. Falling back to onNext in toIterable when the iterator isn't
an InternalStateIterator fixes all of these. Found while reviewing FLINK-39624.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)