danny0405 commented on a change in pull request #4037:
URL: https://github.com/apache/hudi/pull/4037#discussion_r755741499
##########
File path:
hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/client/SparkRDDWriteClient.java
##########
@@ -386,9 +396,13 @@ private void
completeClustering(HoodieReplaceCommitMetadata metadata, JavaRDD<Wr
throw new HoodieClusteringException("Clustering failed to write to
files:"
+ writeStats.stream().filter(s -> s.getTotalWriteErrors() >
0L).map(s -> s.getFileId()).collect(Collectors.joining(",")));
}
- writeTableMetadata(table, metadata, new
HoodieInstant(HoodieInstant.State.INFLIGHT,
HoodieTimeline.REPLACE_COMMIT_ACTION, clusteringCommitTime));
- finalizeWrite(table, clusteringCommitTime, writeStats);
try {
+ HoodieInstant clusteringInstant = new
HoodieInstant(HoodieInstant.State.INFLIGHT,
HoodieTimeline.REPLACE_COMMIT_ACTION, clusteringCommitTime);
+ if (config.isMetadataTableEnabled()) { // when metadata is not enabled,
we don't want to take a lock here even with multi-writers.
+ this.txnManager.beginTransaction(Option.of(clusteringInstant),
Option.empty());
Review comment:
Can we also fix `HoodieFlinkWriteClient` ?
--
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]