codope commented on a change in pull request #4588:
URL: https://github.com/apache/hudi/pull/4588#discussion_r788788149
##########
File path:
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/utils/TransactionUtils.java
##########
@@ -60,9 +60,31 @@
final Option<HoodieCommitMetadata> thisCommitMetadata,
final HoodieWriteConfig config,
Option<HoodieInstant> lastCompletedTxnOwnerInstant) throws
HoodieWriteConflictException {
+ return resolveWriteConflictIfAny(table, currentTxnOwnerInstant,
thisCommitMetadata, config, lastCompletedTxnOwnerInstant, false);
+ }
+
+ /**
+ * Resolve any write conflicts when committing data.
+ *
+ * @param table
+ * @param currentTxnOwnerInstant
+ * @param thisCommitMetadata
+ * @param config
+ * @param lastCompletedTxnOwnerInstant
+ * @return
+ * @throws HoodieWriteConflictException
+ */
+ public static Option<HoodieCommitMetadata> resolveWriteConflictIfAny(
+ final HoodieTable table,
+ final Option<HoodieInstant> currentTxnOwnerInstant,
+ final Option<HoodieCommitMetadata> thisCommitMetadata,
+ final HoodieWriteConfig config,
+ Option<HoodieInstant> lastCompletedTxnOwnerInstant,
+ boolean reloadActiveTimeline) throws HoodieWriteConflictException {
Review comment:
Makes sense.
--
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]