danny0405 commented on code in PR #9617:
URL: https://github.com/apache/hudi/pull/9617#discussion_r1343355515
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/metadata/HoodieBackedTableMetadataWriter.java:
##########
@@ -964,7 +976,7 @@ public void update(HoodieRestoreMetadata restoreMetadata,
String instantTime) {
// We cannot create a deltaCommit at instantTime now because a future
(rollback) block has already been written to the logFiles.
// We need to choose a timestamp which would be a validInstantTime for
MDT. This is either a commit timestamp completed on the dataset
// or a timestamp with suffix which we use for MDT clean, compaction etc.
- String syncCommitTime =
HoodieTableMetadataUtil.createRestoreTimestamp(HoodieActiveTimeline.createNewInstantTime());
+ String syncCommitTime =
HoodieTableMetadataUtil.createRestoreTimestamp(writeClient.createNewInstantTime(false));
Review Comment:
Currently, only 2 use cases need a explicit lock:
1. create new instant time
2. transform pending metadata file to complete state
And if the caller already holds a lock, we must not use a lock to avoid
dead-lock.
--
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]