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

enricomi pushed a commit to branch branch-0.9
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git


The following commit(s) were added to refs/heads/branch-0.9 by this push:
     new a6a715fb2 [#1764] fix(client): Fix timeout time unit for unregister 
requests (#1766)
a6a715fb2 is described below

commit a6a715fb2bf6660253299608b18fb1794dddb06e
Author: Enrico Minack <[email protected]>
AuthorDate: Tue Jun 4 10:53:17 2024 +0200

    [#1764] fix(client): Fix timeout time unit for unregister requests (#1766)
    
    ### What changes were proposed in this pull request?
    Method `ThreadUtils.executeTasks` expects milliseconds, but seconds are 
given.
    
    ### Why are the changes needed?
    Requests are interrupted before the configured timeout passes.
    
    Fix: #1764
    
    ### Does this PR introduce _any_ user-facing change?
    Configured timeout is respected.
    
    ### How was this patch tested?
    Manually tested.
---
 .../java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git 
a/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
 
b/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
index 129dadc17..7912e098d 100644
--- 
a/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
+++ 
b/client/src/main/java/org/apache/uniffle/client/impl/ShuffleWriteClientImpl.java
@@ -944,6 +944,7 @@ public class ShuffleWriteClientImpl implements 
ShuffleWriteClient {
 
   @Override
   public void unregisterShuffle(String appId, int shuffleId) {
+    int unregisterTimeMs = unregisterRequestTimeSec * 1000;
     RssUnregisterShuffleRequest request = new 
RssUnregisterShuffleRequest(appId, shuffleId);
 
     Map<Integer, Set<ShuffleServerInfo>> appServerMap = 
shuffleServerInfoMap.get(appId);
@@ -978,7 +979,7 @@ public class ShuffleWriteClientImpl implements 
ShuffleWriteClient {
             }
             return null;
           },
-          unregisterRequestTimeSec,
+          unregisterTimeMs,
           "unregister shuffle server");
 
     } finally {
@@ -991,6 +992,7 @@ public class ShuffleWriteClientImpl implements 
ShuffleWriteClient {
 
   @Override
   public void unregisterShuffle(String appId) {
+    int unregisterTimeMs = unregisterRequestTimeSec * 1000;
     RssUnregisterShuffleByAppIdRequest request = new 
RssUnregisterShuffleByAppIdRequest(appId);
 
     if (appId == null) {
@@ -1026,7 +1028,7 @@ public class ShuffleWriteClientImpl implements 
ShuffleWriteClient {
             }
             return null;
           },
-          unregisterRequestTimeSec,
+          unregisterTimeMs,
           "unregister shuffle server");
 
     } finally {

Reply via email to