thexiay commented on code in PR #9274:
URL: https://github.com/apache/inlong/pull/9274#discussion_r1392051892


##########
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/multiple/IcebergSingleFileCommiter.java:
##########
@@ -316,9 +316,6 @@ private void commitUpToCheckpoint(NavigableMap<Long, 
byte[]> deltaManifestsMap,
             }
             continuousEmptyCheckpoints = 0;
         }
-        // remove already committed snapshot manifest info
-
-        pendingMap.keySet().forEach(deltaManifestsMap::remove);

Review Comment:
   this may be useless, because deltaManifestsMap is type `NavigableMap`, it's 
real type is `TreeMap`. The pendingMap is a view of treemap.
   when call it's `clear()` it infact use iterator to remove element, so If the 
old way went wrong, the current way still goes wrong
   
   @gong 



##########
inlong-sort/sort-flink/sort-flink-v1.13/sort-connectors/iceberg/src/main/java/org/apache/inlong/sort/iceberg/sink/multiple/IcebergSingleFileCommiter.java:
##########
@@ -316,9 +316,6 @@ private void commitUpToCheckpoint(NavigableMap<Long, 
byte[]> deltaManifestsMap,
             }
             continuousEmptyCheckpoints = 0;
         }
-        // remove already committed snapshot manifest info
-
-        pendingMap.keySet().forEach(deltaManifestsMap::remove);

Review Comment:
   this may be useless, because deltaManifestsMap is type `NavigableMap`, it's 
real type is `TreeMap`. The pendingMap is a view of treemap.
   when call it's `clear()` it infact use iterator to remove element, so If the 
old way went wrong, the current way still goes wrong
   
   @gong 



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