Skip to content

Commit

Permalink
[apache#1764] fix(client): Fix timeout time unit for unregister reque…
Browse files Browse the repository at this point in the history
…sts (apache#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: apache#1764

### Does this PR introduce _any_ user-facing change?
Configured timeout is respected.

### How was this patch tested?
Manually tested.
  • Loading branch information
EnricoMi committed Jun 4, 2024
1 parent 56f3de0 commit a6a715f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -944,6 +944,7 @@ public void close() {

@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);
Expand Down Expand Up @@ -978,7 +979,7 @@ public void unregisterShuffle(String appId, int shuffleId) {
}
return null;
},
unregisterRequestTimeSec,
unregisterTimeMs,
"unregister shuffle server");

} finally {
Expand All @@ -991,6 +992,7 @@ public void unregisterShuffle(String appId, int shuffleId) {

@Override
public void unregisterShuffle(String appId) {
int unregisterTimeMs = unregisterRequestTimeSec * 1000;
RssUnregisterShuffleByAppIdRequest request = new RssUnregisterShuffleByAppIdRequest(appId);

if (appId == null) {
Expand Down Expand Up @@ -1026,7 +1028,7 @@ public void unregisterShuffle(String appId) {
}
return null;
},
unregisterRequestTimeSec,
unregisterTimeMs,
"unregister shuffle server");

} finally {
Expand Down

0 comments on commit a6a715f

Please sign in to comment.