Skip to content

Commit

Permalink
[apache#1472][part-6] followup: Fix Netty transport time when sending…
Browse files Browse the repository at this point in the history
… shuffle data requests (apache#1551)

### What changes were proposed in this pull request?

Refresh `timestamp` when sending `SendShuffleDataRequest`.

### Why are the changes needed?

A follow-up PR for: apache#1534

### Does this PR introduce _any_ user-facing change?

No.

### How was this patch tested?

Existing UTs.
  • Loading branch information
rickyma committed Feb 29, 2024
1 parent 37ec78b commit 9f4ccde
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -141,4 +141,8 @@ public Map<Integer, List<ShuffleBlockInfo>> getPartitionToBlocks() {
public long getTimestamp() {
return timestamp;
}

public void setTimestamp(long timestamp) {
this.timestamp = timestamp;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ
try {
RetryUtils.retryWithCondition(
() -> {
TransportClient transportClient = getTransportClient();
final TransportClient transportClient = getTransportClient();
long requireId =
requirePreAllocation(
request.getAppId(),
Expand All @@ -129,8 +129,8 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ
"requirePreAllocation failed! size[%s], host[%s], port[%s]",
allocateSize, host, port));
}

sendShuffleDataRequest.setRequireId(requireId);
sendShuffleDataRequest.setTimestamp(System.currentTimeMillis());
long start = System.currentTimeMillis();
RpcResponse rpcResponse =
transportClient.sendRpcSync(sendShuffleDataRequest, rpcTimeout);
Expand Down

0 comments on commit 9f4ccde

Please sign in to comment.