wombatu-kun commented on code in PR #20015:
URL: https://github.com/apache/hudi/pull/20015#discussion_r4060532540


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/sink/buffer/RowDataBucket.java:
##########
@@ -66,7 +66,7 @@ public void sort() throws IOException {
   public boolean writeRow(RowData rowData) throws IOException {
     ValidationUtils.checkState(
         !diverged,
-        "RowData bucket " + bucketId + " diverged after a failed write and 
cannot be reused");
+        () -> "RowData bucket " + bucketId + " diverged after a failed write 
and cannot be reused");

Review Comment:
   Two per-record sites on the Flink write path still build their message 
eagerly: `PreemptiveMemorySegmentPool.setCurrentOwner`, which 
`StreamWriteFunction.doBufferRecord` calls for every record right before this 
`writeRow`, and the `String.format` in `GroupedInsertPartitioner.partition`. 
Could they get the same `() ->` treatment?



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