mxm commented on code in PR #18717:
URL: https://github.com/apache/iceberg/pull/18717#discussion_r4481449536


##########
flink/v2.3/flink/src/main/java/org/apache/iceberg/flink/maintenance/operator/EqualityConvertPKIndex.java:
##########
@@ -294,4 +327,15 @@ private void clearKeyState() {
     resolveSequenceNumber.clear();
     resolveSpecIds.clear();
   }
+
+  // Drops the generation of a key without rows, to prevent leaking state. 
Buffered rows and a
+  // pending resolve are still needed in this cycle, and without the 
generation, the next command
+  // clears them as stale.
+  private void clearGenerationIfEmpty() throws Exception {
+    if (!dataRowPositions.get().iterator().hasNext()

Review Comment:
   Not sure whether this optimization is worth it. This is only called in 
places where we already read from state, and we will continue to poll 
`bufferedRows`. I would skip this optimization for now.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to