XuQianJin-Stars commented on code in PR #5858:
URL: https://github.com/apache/hudi/pull/5858#discussion_r896355179
##########
hudi-client/hudi-flink-client/src/main/java/org/apache/hudi/client/HoodieFlinkWriteClient.java:
##########
@@ -152,6 +152,17 @@ public List<WriteStatus> upsert(List<HoodieRecord<T>>
records, String instantTim
return postWrite(result, instantTime, table);
}
+ public List<WriteStatus> upsert(HoodieFlinkTable<T> table,
List<HoodieRecord<T>> records, String instantTime) {
+ preWrite(instantTime, WriteOperationType.UPSERT, table.getMetaClient());
+ final HoodieWriteHandle<?, ?, ?, ?> writeHandle =
getOrCreateWriteHandle(records.get(0), getConfig(),
+ instantTime, table, records.listIterator());
Review Comment:
> There is no much sense to reuse the `table` object, we need a fresh new
local timeline for the table each time we do the write action, and the timeline
construction/refresh takes most of the time for table initialization.
>
> So -1 on this change for correctness and robustness.
From the flame graph, rebuilding the table initialization is time consuming,
so I want to reuse this object as much as possible.
--
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]