This is an automated email from the ASF dual-hosted git repository.

zhouky pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-celeborn.git


The following commit(s) were added to refs/heads/main by this push:
     new ef4c12e0f [CELEBORN-565] FETCH_MAX_RETRIES should double when enable 
replicates (#1471)
ef4c12e0f is described below

commit ef4c12e0feb34774e5abbac064e5e899d5973b05
Author: Angerszhuuuu <[email protected]>
AuthorDate: Fri Apr 28 14:27:35 2023 +0800

    [CELEBORN-565] FETCH_MAX_RETRIES should double when enable replicates 
(#1471)
---
 .../celeborn/plugin/flink/readclient/FlinkShuffleClientImpl.java | 2 +-
 .../java/org/apache/celeborn/client/read/RssInputStream.java     | 6 +++++-
 .../src/main/scala/org/apache/celeborn/common/CelebornConf.scala | 9 +++++----
 docs/configuration/client.md                                     | 2 +-
 4 files changed, 12 insertions(+), 7 deletions(-)

diff --git 
a/client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/readclient/FlinkShuffleClientImpl.java
 
b/client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/readclient/FlinkShuffleClientImpl.java
index dda86c10d..d8eb200d1 100644
--- 
a/client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/readclient/FlinkShuffleClientImpl.java
+++ 
b/client-flink/common/src/main/java/org/apache/celeborn/plugin/flink/readclient/FlinkShuffleClientImpl.java
@@ -106,7 +106,7 @@ public class FlinkShuffleClientImpl extends 
ShuffleClientImpl {
         new TransportContext(
             dataTransportConf, readClientHandler, 
conf.clientCloseIdleConnections());
     this.flinkTransportClientFactory =
-        new FlinkTransportClientFactory(context, conf.fetchMaxRetries());
+        new FlinkTransportClientFactory(context, 
conf.fetchMaxRetriesForEachReplica());
   }
 
   public RssBufferStream readBufferedPartition(
diff --git 
a/client/src/main/java/org/apache/celeborn/client/read/RssInputStream.java 
b/client/src/main/java/org/apache/celeborn/client/read/RssInputStream.java
index fc3ff0d4a..800790909 100644
--- a/client/src/main/java/org/apache/celeborn/client/read/RssInputStream.java
+++ b/client/src/main/java/org/apache/celeborn/client/read/RssInputStream.java
@@ -152,7 +152,11 @@ public abstract class RssInputStream extends InputStream {
 
       decompressor = Decompressor.getDecompressor(conf);
 
-      fetchChunkMaxRetry = conf.fetchMaxRetries();
+      if (conf.pushReplicateEnabled()) {
+        fetchChunkMaxRetry = conf.fetchMaxRetriesForEachReplica() * 2;
+      } else {
+        fetchChunkMaxRetry = conf.fetchMaxRetriesForEachReplica();
+      }
       TransportConf transportConf =
           Utils.fromCelebornConf(conf, TransportModuleConstants.DATA_MODULE, 
0);
       retryWaitMs = transportConf.ioRetryWaitTimeMs();
diff --git 
a/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala 
b/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
index 5a4924db0..e6d1ddd3a 100644
--- a/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
+++ b/common/src/main/scala/org/apache/celeborn/common/CelebornConf.scala
@@ -659,7 +659,7 @@ class CelebornConf(loadDefaults: Boolean) extends Cloneable 
with Logging with Se
   // //////////////////////////////////////////////////////
   def fetchTimeoutMs: Long = get(FETCH_TIMEOUT)
   def fetchMaxReqsInFlight: Int = get(FETCH_MAX_REQS_IN_FLIGHT)
-  def fetchMaxRetries: Int = get(FETCH_MAX_RETRIES)
+  def fetchMaxRetriesForEachReplica: Int = 
get(FETCH_MAX_RETRIES_FOR_EACH_REPLICA)
 
   // //////////////////////////////////////////////////////
   //               Shuffle Client Push                   //
@@ -1391,11 +1391,12 @@ object CelebornConf extends Logging {
       .intConf
       .createWithDefault(1024)
 
-  val FETCH_MAX_RETRIES: ConfigEntry[Int] =
-    buildConf("celeborn.fetch.maxRetries")
+  val FETCH_MAX_RETRIES_FOR_EACH_REPLICA: ConfigEntry[Int] =
+    buildConf("celeborn.fetch.maxRetriesForEachReplica")
+      .withAlternative("celeborn.fetch.maxRetries")
       .categories("client")
       .version("0.2.0")
-      .doc("Max retries of fetch chunk")
+      .doc("Max retry times of fetch chunk on each replica")
       .intConf
       .createWithDefault(3)
 
diff --git a/docs/configuration/client.md b/docs/configuration/client.md
index c645b25fe..babfc1b02 100644
--- a/docs/configuration/client.md
+++ b/docs/configuration/client.md
@@ -25,7 +25,7 @@ license: |
 | celeborn.client.closeIdleConnections | true | Whether client will close idle 
connections. | 0.3.0 | 
 | celeborn.client.maxRetries | 15 | Max retry times for client to connect 
master endpoint | 0.2.0 | 
 | celeborn.fetch.maxReqsInFlight | 3 | Amount of in-flight chunk fetch 
request. | 0.2.0 | 
-| celeborn.fetch.maxRetries | 3 | Max retries of fetch chunk | 0.2.0 | 
+| celeborn.fetch.maxRetriesForEachReplica | 3 | Max retry times of fetch chunk 
on each replica | 0.2.0 | 
 | celeborn.fetch.timeout | 120s | Timeout for a task to fetch chunk. | 0.2.0 | 
 | celeborn.master.endpoints | &lt;localhost&gt;:9097 | Endpoints of master 
nodes for celeborn client to connect, allowed pattern is: 
`<host1>:<port1>[,<host2>:<port2>]*`, e.g. `clb1:9097,clb2:9098,clb3:9099`. If 
the port is omitted, 9097 will be used. | 0.2.0 | 
 | celeborn.push.buffer.initial.size | 8k |  | 0.2.0 | 

Reply via email to