diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/embedded/EmbeddedTimelineService.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/embedded/EmbeddedTimelineService.java index e07bde915a089..6fcc975004564 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/embedded/EmbeddedTimelineService.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/embedded/EmbeddedTimelineService.java @@ -95,7 +95,9 @@ public void startServer() throws IOException { .earlyConflictDetectionCheckCommitConflict(writeConfig.earlyConflictDetectionCheckCommitConflict()) .asyncConflictDetectorInitialDelayMs(writeConfig.getAsyncConflictDetectorInitialDelayMs()) .asyncConflictDetectorPeriodMs(writeConfig.getAsyncConflictDetectorPeriodMs()) - .earlyConflictDetectionMaxAllowableHeartbeatIntervalInMs(writeConfig.getHoodieClientHeartbeatIntervalInMs()); + .earlyConflictDetectionMaxAllowableHeartbeatIntervalInMs( + writeConfig.getHoodieClientHeartbeatIntervalInMs() + * writeConfig.getHoodieClientHeartbeatTolerableMisses()); } server = new TimelineService(context, hadoopConf.newCopy(), timelineServiceConfBuilder.build(), diff --git a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java index b9d7c800250a0..60ac3712adba5 100644 --- a/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java +++ b/hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieWriteConfig.java @@ -582,7 +582,7 @@ public class HoodieWriteConfig extends HoodieConfig { public static final ConfigProperty ASYNC_CONFLICT_DETECTOR_INITIAL_DELAY_MS = ConfigProperty .key(CONCURRENCY_PREFIX + "async.conflict.detector.initial_delay_ms") - .defaultValue(30000L) + .defaultValue(0L) .sinceVersion("0.13.0") .withDocumentation("Used for timeline-server-based markers with " + "`AsyncTimelineServerBasedDetectionStrategy`. " diff --git a/hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/TimelineService.java b/hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/TimelineService.java index 2f21af102acdd..7082a5f22ccab 100644 --- a/hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/TimelineService.java +++ b/hudi-timeline-service/src/main/java/org/apache/hudi/timeline/service/TimelineService.java @@ -145,7 +145,7 @@ public static class Config implements Serializable { "Used for timeline-server-based markers with " + "`AsyncTimelineServerBasedDetectionStrategy`. " + "The time in milliseconds to delay the first execution of async marker-based conflict detection.") - public Long asyncConflictDetectorInitialDelayMs = 30000L; + public Long asyncConflictDetectorInitialDelayMs = 0L; @Parameter(names = {"--async-conflict-detector-period-ms"}, description = "Used for timeline-server-based markers with " @@ -157,7 +157,7 @@ public static class Config implements Serializable { "Used for timeline-server-based markers with " + "`AsyncTimelineServerBasedDetectionStrategy`. " + "Instants whose heartbeat is greater than the current value will not be used in early conflict detection.") - public Long maxAllowableHeartbeatIntervalInMs = 60000L; + public Long maxAllowableHeartbeatIntervalInMs = 120000L; @Parameter(names = {"--help", "-h"}) public Boolean help = false; @@ -186,9 +186,9 @@ public static class Builder { private String earlyConflictDetectionStrategy = "org.apache.hudi.timeline.service.handlers.marker.AsyncTimelineServerBasedDetectionStrategy"; private Boolean checkCommitConflict = false; private Boolean earlyConflictDetectionEnable = false; - private Long asyncConflictDetectorInitialDelayMs = 30000L; + private Long asyncConflictDetectorInitialDelayMs = 0L; private Long asyncConflictDetectorPeriodMs = 30000L; - private Long maxAllowableHeartbeatIntervalInMs = 60000L; + private Long maxAllowableHeartbeatIntervalInMs = 120000L; public Builder() { }