You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/10/29 01:18:05 UTC

[GitHub] [spark] jiangxb1987 opened a new pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

jiangxb1987 opened a new pull request #34428:
URL: https://github.com/apache/spark/pull/34428


   <!--
   Thanks for sending a pull request!  Here are some tips for you:
     1. If this is your first time, please read our contributor guidelines: https://spark.apache.org/contributing.html
     2. Ensure you have added or run the appropriate tests for your PR: https://spark.apache.org/developer-tools.html
     3. If the PR is unfinished, add '[WIP]' in your PR title, e.g., '[WIP][SPARK-XXXX] Your PR title ...'.
     4. Be sure to keep the PR description updated to reflect all changes.
     5. Please write your PR title to summarize what this PR proposes.
     6. If possible, provide a concise example to reproduce the issue for a faster review.
     7. If you want to add a new configuration, please read the guideline first for naming configurations in
        'core/src/main/scala/org/apache/spark/internal/config/ConfigEntry.scala'.
     8. If you want to add or modify an error type or message, please read the guideline first in
        'core/src/main/resources/error/README.md'.
   -->
   
   ### What changes were proposed in this pull request?
   <!--
   Please clarify what changes you are proposing. The purpose of this section is to outline the changes and how this PR fixes the issue. 
   If possible, please consider writing useful notes for better and faster reviews in your PR. See the examples below.
     1. If you refactor some codes with changing classes, showing the class hierarchy will help reviewers.
     2. If you fix some SQL features, you can provide some references of other DBMSes.
     3. If there is design documentation, please add the link.
     4. If there is a discussion in the mailing list, please add the link.
   -->
   A worker would retry sending the ExecutorStateChanged message when the previous attempt failed. This would not be an issue when the attempt failed with TimeoutException. But if the connection between the worker and the master is broken, the attempt would fail immediately, leading to the retry attempt also fail, and quickly reaches the max attempt limitation.
   
   The PR detects the failure reason, if an attempt failed due to bad connection, we can wait for a while (the default RPC timeout interval) before retrying. This prevents quick failure due to transient network issues.
   
   The PR also adds a new config `spark.worker.executorStateSync.maxAttempts`, which controls the max attempt number of ExecutorStateChanged sync between a worker and the master.
   
   ### Why are the changes needed?
   <!--
   Please clarify why the changes are needed. For instance,
     1. If you propose a new API, clarify the use case for a new API.
     2. If you fix a bug, you can clarify why it is a bug.
   -->
   To avoid a worker exit quickly due to transient network issues.
   
   ### Does this PR introduce _any_ user-facing change?
   <!--
   Note that it means *any* user-facing change including all aspects such as the documentation fix.
   If yes, please clarify the previous behavior and the change this PR proposes - provide the console output, description and/or an example to show the behavior difference if possible.
   If possible, please also clarify if this is a user-facing change compared to the released Spark versions or within the unreleased branches such as master.
   If no, write 'No'.
   -->
   Yes, this PR adds a new config `spark.worker.executorStateSync.maxAttempts`, which controls the max attempt number of ExecutorStateChanged sync between a worker and the master.
   
   ### How was this patch tested?
   <!--
   If tests were added, say they were added here. Please make sure to add some test cases that check the changes thoroughly including negative and positive cases if possible.
   If it was tested in a way different from regular unit tests, please clarify how you tested step by step, ideally copy and paste-able, so that other reviewers can test and check, and descendants can verify in the future.
   If tests were not added, please describe why they were not added and/or why it was difficult to add.
   If benchmark tests were added, please run the benchmarks in GitHub Actions for the consistent environment, and the instructions could accord to: https://spark.apache.org/developer-tools.html#github-workflow-benchmarks.
   -->
   Verified with a few customers, confirmed they didn't hit the worker exit issue again with this patch.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] dongjoon-hyun closed pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
dongjoon-hyun closed pull request #34428:
URL: https://github.com/apache/spark/pull/34428


   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954543198


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144735/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Ngone51 commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-958670018






-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954415933


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144728/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] mridulm commented on a change in pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
mridulm commented on a change in pull request #34428:
URL: https://github.com/apache/spark/pull/34428#discussion_r742253913



##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Curious, why is this set to `defaultAskTimeout` ?
   Is it to pick some arbitrary value ? Or any rationale behind waiting for ask timeout before retrying ?




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954471907


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49204/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954437654


   **[Test build #144735 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144735/testReport)** for PR 34428 at commit [`c5c522f`](https://github.com/apache/spark/commit/c5c522f8542815846fcf5f1186e4906506b7d274).


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954396462


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49197/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jiangxb1987 commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
jiangxb1987 commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-962247227


   Thanks @mridulm @dongjoon-hyun @Ngone51 @cloud-fan !


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Ngone51 commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-958670018


   cc @cloud-fan 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954335804


   **[Test build #144728 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144728/testReport)** for PR 34428 at commit [`96c2149`](https://github.com/apache/spark/commit/96c2149ca7c96acc3fc234870162fbd7f765bad6).


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954415933


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144728/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954396462


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49197/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954488740


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49204/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954380035


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49197/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954350692


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49197/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] Ngone51 commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
Ngone51 commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-958670018


   cc @cloud-fan 


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA removed a comment on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954437654


   **[Test build #144735 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144735/testReport)** for PR 34428 at commit [`c5c522f`](https://github.com/apache/spark/commit/c5c522f8542815846fcf5f1186e4906506b7d274).


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954522556


   **[Test build #144735 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144735/testReport)** for PR 34428 at commit [`c5c522f`](https://github.com/apache/spark/commit/c5c522f8542815846fcf5f1186e4906506b7d274).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954488740


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/49204/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954335804


   **[Test build #144728 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144728/testReport)** for PR 34428 at commit [`96c2149`](https://github.com/apache/spark/commit/96c2149ca7c96acc3fc234870162fbd7f765bad6).


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954411797


   **[Test build #144728 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/144728/testReport)** for PR 34428 at commit [`96c2149`](https://github.com/apache/spark/commit/96c2149ca7c96acc3fc234870162fbd7f765bad6).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jiangxb1987 commented on a change in pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
jiangxb1987 commented on a change in pull request #34428:
URL: https://github.com/apache/spark/pull/34428#discussion_r742430558



##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Thanks @mridulm for raising the concern! The idea here is to make the wait time between two RPC sync attempts similar on failures. When the attempt fail due to TimeoutException, it should have waited for the interval defined by `defaultAskTimeout`. When the attempt fail due to bad network connection, it would fail immediately, so we insert an extra wait interval that is equal to `defaultAskTimeout` here. I agree the wait time here would not be strictly the same, but we just want to make sure it wait for a reasonable time range before starting another RPC sync attempt.

##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Thanks @mridulm for raising the concern! The idea here is to make the wait time between two RPC sync attempts similar on failures. When the attempt fail due to TimeoutException, it should have waited for the interval defined by `defaultAskTimeout`. When the attempt fail due to bad network connection, it would fail immediately, so we insert an extra wait interval that is equal to `defaultAskTimeout` here. I agree the wait time here would not be strictly the same, but we just want to make sure it wait for a reasonable time range before starting another RPC sync attempt.




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] SparkQA commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954452069


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/49204/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] AmplabJenkins commented on pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34428:
URL: https://github.com/apache/spark/pull/34428#issuecomment-954543198


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/144735/
   


-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] mridulm commented on a change in pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
mridulm commented on a change in pull request #34428:
URL: https://github.com/apache/spark/pull/34428#discussion_r742253913



##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Curious, why is this set to `defaultAskTimeout` ?
   Is it to pick some arbitrary value ? Or any rationale behind waiting for ask timeout before retrying ?

##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Not a concern as such :-)
   Just wanted to understand the rationale. Sounds good to me, thanks for clarifying !




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jiangxb1987 commented on a change in pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
jiangxb1987 commented on a change in pull request #34428:
URL: https://github.com/apache/spark/pull/34428#discussion_r742430558



##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Thanks @mridulm for raising the concern! The idea here is to make the wait time between two RPC sync attempts similar on failures. When the attempt fail due to TimeoutException, it should have waited for the interval defined by `defaultAskTimeout`. When the attempt fail due to bad network connection, it would fail immediately, so we insert an extra wait interval that is equal to `defaultAskTimeout` here. I agree the wait time here would not be strictly the same, but we just want to make sure it wait for a reasonable time range before starting another RPC sync attempt.




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] mridulm commented on a change in pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
mridulm commented on a change in pull request #34428:
URL: https://github.com/apache/spark/pull/34428#discussion_r742253913



##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Curious, why is this set to `defaultAskTimeout` ?
   Is it to pick some arbitrary value ? Or any rationale behind waiting for ask timeout before retrying ?

##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Curious, why is this set to `defaultAskTimeout` ?
   Is it to pick some arbitrary value ? Or any rationale behind waiting for ask timeout before retrying ?




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org


[GitHub] [spark] jiangxb1987 commented on a change in pull request #34428: [SPARK-37151][CORE] Avoid ExecutorStateChanged sync attempt retry immediately when failed due to bad connection

Posted by GitBox <gi...@apache.org>.
jiangxb1987 commented on a change in pull request #34428:
URL: https://github.com/apache/spark/pull/34428#discussion_r742430558



##########
File path: core/src/main/scala/org/apache/spark/deploy/worker/Worker.scala
##########
@@ -782,13 +784,23 @@ private[deploy] class Worker(
 
           case Failure(t) =>
             val failures = executorStateSyncFailureAttempts.getOrElse(fullId, 0) + 1
-            if (failures < 5) {
+            if (failures < executorStateSyncMaxAttempts) {
               logError(s"Failed to send $newState to Master $masterRef, " +
-                s"will retry ($failures/5).", t)
+                s"will retry ($failures/$executorStateSyncMaxAttempts).", t)
               executorStateSyncFailureAttempts(fullId) = failures
+              // If the failure is not caused by TimeoutException, wait for a while before retry in
+              // case the connection is temporarily unavailable.
+              if (!t.isInstanceOf[TimeoutException]) {
+                try {
+                  Thread.sleep(defaultAskTimeout)

Review comment:
       Thanks @mridulm for raising the concern! The idea here is to make the wait time between two RPC sync attempts similar on failures. When the attempt fail due to TimeoutException, it should have waited for the interval defined by `defaultAskTimeout`. When the attempt fail due to bad network connection, it would fail immediately, so we insert an extra wait interval that is equal to `defaultAskTimeout` here. I agree the wait time here would not be strictly the same, but we just want to make sure it wait for a reasonable time range before starting another RPC sync attempt.




-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org