Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[🍒][CDAP-20956] increase system worker request retry timeout #15561

Merged
merged 1 commit into from
Feb 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
new DefaultHttpRequestConfig(false));
}

public RemoteTaskExecutor(CConfiguration cConf, MetricsCollectionService metricsCollectionService,

Check warning on line 84 in cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java

View workflow job for this annotation

GitHub Actions / Checkstyle

com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck

Missing a Javadoc comment.

Check warning on line 84 in cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java

View workflow job for this annotation

GitHub Actions / Checkstyle

com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocMethodCheck

Missing a Javadoc comment.
RemoteClientFactory remoteClientFactory, Type workerType,
HttpRequestConfig httpRequestConfig) {
this.compression = cConf.getBoolean(Constants.TaskWorker.COMPRESSION_ENABLED);
Expand All @@ -90,13 +90,15 @@
this.remoteClient = remoteClientFactory.createRemoteClient(serviceName,
httpRequestConfig,
Constants.Gateway.INTERNAL_API_VERSION_3);
this.retryStrategy = RetryStrategies.fromConfiguration(cConf,
Constants.Service.TASK_WORKER + ".");
this.metricsCollectionService = metricsCollectionService;
if (workerType == Type.TASK_WORKER) {
this.workerUrl = TASK_WORKER_URL;
this.retryStrategy = RetryStrategies.fromConfiguration(cConf,
Constants.Service.TASK_WORKER + ".");
} else {
this.workerUrl = SYSTEM_WORKER_URL;
this.retryStrategy = RetryStrategies.fromConfiguration(cConf,
Constants.Service.SYSTEM_WORKER + ".");
}
}

Expand Down Expand Up @@ -172,7 +174,7 @@
}
}

/**

Check warning on line 177 in cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java

View workflow job for this annotation

GitHub Actions / Checkstyle

com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck

First sentence of Javadoc is missing an ending period.

Check warning on line 177 in cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java

View workflow job for this annotation

GitHub Actions / Checkstyle

com.puppycrawl.tools.checkstyle.checks.javadoc.SummaryJavadocCheck

First sentence of Javadoc is missing an ending period.
* Find if attempt count is included in the suppressed throwable
*
* @param e Exception to analyze
Expand Down Expand Up @@ -254,7 +256,7 @@
a task worker pod.
Use system worker pod for executing secure logic remotely on a system worker pod.
*/
public enum Type {

Check warning on line 259 in cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java

View workflow job for this annotation

GitHub Actions / Checkstyle

com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck

Missing a Javadoc comment.

Check warning on line 259 in cdap-common/src/main/java/io/cdap/cdap/common/internal/remote/RemoteTaskExecutor.java

View workflow job for this annotation

GitHub Actions / Checkstyle

com.puppycrawl.tools.checkstyle.checks.javadoc.MissingJavadocTypeCheck

Missing a Javadoc comment.
SYSTEM_WORKER,
TASK_WORKER
}
Expand Down
45 changes: 45 additions & 0 deletions cdap-common/src/main/resources/cdap-default.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4237,6 +4237,51 @@
</description>
</property>

<!-- Retry configuration for system worker -->
<!-- Use an exponential delay that cap at 2 seconds interval -->
<property>
<name>system.worker.retry.policy.base.delay.ms</name>
<value>100</value>
<description>
The base delay between retries in milliseconds
</description>
</property>

<property>
<name>system.worker.retry.policy.max.delay.ms</name>
<value>2000</value>
<description>
The maximum delay between retries in milliseconds
</description>
</property>

<!-- Set to Integer max value, so the retry attempts end based on task.worker.retry.policy.max.time.secs -->
<property>
<name>system.worker.retry.policy.max.retries</name>
<value>2147483647</value>
<description>
The maximum number of retries to attempt before aborting
</description>
</property>

<!-- Set to 300s to match the default http request timeout -->
<property>
<name>system.worker.retry.policy.max.time.secs</name>
<value>300</value>
<description>
The maximum elapsed time in seconds before retries are aborted
</description>
</property>

<property>
<name>system.worker.retry.policy.type</name>
<value>exponential.backoff</value>
<description>
The type of retry policy for programs. Allowed options:
"none", "fixed.delay", or "exponential.backoff".
</description>
</property>

<!-- Retry configuration for artifact cache -->
<!-- Use an exponential delay that cap at 2 seconds interval -->
<property>
Expand Down
Loading