nsivabalan commented on code in PR #18089:
URL: https://github.com/apache/hudi/pull/18089#discussion_r2919919902
##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/transaction/PreferWriterConflictResolutionStrategy.java:
##########
@@ -54,12 +54,24 @@ public Stream<HoodieInstant>
getCandidateInstants(HoodieTableMetaClient metaClie
HoodieActiveTimeline activeTimeline = metaClient.reloadActiveTimeline();
if (ClusteringUtils.isClusteringInstant(activeTimeline, currentInstant,
metaClient.getInstantGenerator())
|| COMPACTION_ACTION.equals(currentInstant.getAction())) {
- return getCandidateInstantsForTableServicesCommits(activeTimeline,
currentInstant);
+ return
Stream.concat(getCandidateInstantsForTableServicesCommits(activeTimeline,
currentInstant),
+ getCandidateInstantsForRollbackConflict(activeTimeline,
currentInstant));
} else {
- return getCandidateInstantsForNonTableServicesCommits(activeTimeline,
currentInstant);
+ return
Stream.concat(getCandidateInstantsForNonTableServicesCommits(activeTimeline,
currentInstant),
+ getCandidateInstantsForRollbackConflict(activeTimeline,
currentInstant));
}
}
+ private Stream<HoodieInstant>
getCandidateInstantsForRollbackConflict(HoodieActiveTimeline activeTimeline,
HoodieInstant currentInstant) {
+ // Add Requested rollback action instants that were created after the
current instant.
+ List<HoodieInstant> pendingRollbacks = activeTimeline
+ .findInstantsAfter(currentInstant.requestedTime())
+ .filterPendingRollbackTimeline()
Review Comment:
so, what incase the rollback was inflight when we are w/n the conflict
resolution step for the ingestion commit?
my understanding is that, we will let the ingestion write complete
successfully.
and later rollback also could complete successfully. is that a fair
statement?
--
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]