kbuci commented on code in PR #18302:
URL: https://github.com/apache/hudi/pull/18302#discussion_r2944535323


##########
hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java:
##########
@@ -674,6 +675,35 @@ public class HoodieWriteConfig extends HoodieConfig {
       .markAdvanced()
       .withDocumentation("Number of heartbeat misses, before a writer is 
deemed not alive and all pending writes are aborted.");
 
+  public static final ConfigProperty<Boolean> ROLLBACK_FAILED_CLUSTERING = 
ConfigProperty
+      .key("hoodie.rollback.failed.clustering")
+      .defaultValue(false)
+      .withInferFunction(cfg -> {
+        String strategy = 
cfg.getStringOrDefault(HoodieLockConfig.WRITE_CONFLICT_RESOLUTION_STRATEGY_CLASS_NAME,
 "");
+        if 
(PreferWriterConflictResolutionStrategy.class.getName().equals(strategy)) {
+          return Option.of(true);
+        }
+        return Option.empty();
+      })
+      .markAdvanced()
+      .withDocumentation("When enabled, rollback of failed writes (under LAZY 
cleaning policy) will also attempt to rollback "
+          + "clustering replacecommit instants whose heartbeat has expired. 
This is automatically enabled when using "
+          + "PreferWriterConflictResolutionStrategy. Clustering jobs will 
start a heartbeat before scheduling a plan, "
+          + "so that other writers can detect stale/failed clustering 
attempts. Note that the same "
+          + "client must be used to schedule, execute, and commit the 
clustering instant.");
+
+  public static final ConfigProperty<Long> 
ROLLBACK_FAILED_CLUSTERING_WAIT_MINUTES = ConfigProperty
+      .key("hoodie.rollback.failed.clustering.wait.minutes")
+      .defaultValue(60L)
+      .markAdvanced()
+      .withDocumentation("When hoodie.rollback.failed.clustering is enabled, 
rollbackFailedWrites will not attempt to rollback "
+          + "a clustering instant unless it is at least this many minutes old. 
This is a temporary guardrail to reduce the chance "
+          + "of transient failures from concurrent rollback attempts until 
https://github.com/apache/hudi/issues/18050 is resolved.");

Review Comment:
   Oh ok if this change will anyway be released with the rest in 1.2 then makes 
sense let me remove that reference 



-- 
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]

Reply via email to