SteNicholas commented on code in PR #9212:
URL: https://github.com/apache/hudi/pull/9212#discussion_r1273049997
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/BaseHoodieWriteClient.java:
##########
@@ -862,11 +866,29 @@ public String startCommit(String actionType,
HoodieTableMetaClient metaClient) {
CleanerUtils.rollbackFailedWrites(config.getFailedWritesCleanPolicy(),
HoodieTimeline.COMMIT_ACTION, () ->
tableServiceClient.rollbackFailedWrites());
- String instantTime = HoodieActiveTimeline.createNewInstantTime();
+ String instantTime = createCommit();
startCommit(instantTime, actionType, metaClient);
return instantTime;
}
+ /**
+ * Creates a new commit time for a write operation
(insert/update/delete/insert_overwrite/insert_overwrite_table).
+ *
+ * @return Instant time to be generated.
+ */
+ public String createCommit() {
+ if
(config.getWriteConcurrencyMode().supportsOptimisticConcurrencyControl()) {
+ try {
+ lockManager.lock();
+ return HoodieActiveTimeline.createNewInstantTime();
Review Comment:
@KnightChess, I agree with this point. Table services have been updated to
use `BaseHoodieWriteClient#createNewInstantTime`.
--
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]