rkhachatryan commented on code in PR #28933:
URL: https://github.com/apache/flink/pull/28933#discussion_r3727750182


##########
flink-table/flink-table-runtime/src/main/java/org/apache/flink/table/runtime/operators/sink/WatermarkCompactingSinkMaterializer.java:
##########
@@ -231,6 +224,9 @@ private void consolidateBufferToMinValue() throws Exception 
{
             }
         }
 
+        // Clear only after all values were read.
+        buffer.clear();

Review Comment:
   This is simpler indeed, but RocksDB opens a new iterator here IIRC.
   Opening an iterator is quite expensive, so this might cause a performance 
regression.



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