masteryhx commented on code in PR #23239:
URL: https://github.com/apache/flink/pull/23239#discussion_r1385899714
##########
flink-libraries/flink-state-processing-api/src/main/java/org/apache/flink/state/api/input/MultiStateKeyIterator.java:
##########
@@ -46,47 +48,54 @@ public final class MultiStateKeyIterator<K> implements
CloseableIterator<K> {
private final KeyedStateBackend<K> backend;
- private final Iterator<K> internal;
+ /** Avoids using Stream#flatMap due to a known flaw, see FLINK-26585 for
more details. */
+ private final Iterator<? extends StateDescriptor<?, ?>> outerIter;
+
+ private Iterator<K> innerIter;
private final CloseableRegistry registry;
private K currentKey;
public MultiStateKeyIterator(
List<? extends StateDescriptor<?, ?>> descriptors,
KeyedStateBackend<K> backend) {
+
+ outerIter = descriptors.iterator();
Review Comment:
Move L63-L64 to L68 ?
It's better to call the method after `checkNotNull`
--
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]