Skip to content

Commit

Permalink
[#2298] fix(server): Correct the metric of grpc_get_local_shuffle_dat…
Browse files Browse the repository at this point in the history
…a_process_latency (#2299)

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

Correct the metric of grpc_get_local_shuffle_data_process_latency

### Why are the changes needed?

fix #2298

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

No.

### How was this patch tested?

Needn't


Co-authored-by: Junfan Zhang <zhangjunfan@qiyi.com>
  • Loading branch information
zuston and Junfan Zhang authored Dec 18, 2024
1 parent 258db12 commit 8c55030
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1198,6 +1198,12 @@ public void getLocalShuffleData(
offset,
length,
storageId);
reply =
GetLocalShuffleDataResponse.newBuilder()
.setStatus(status.toProto())
.setRetMsg(msg)
.setData(UnsafeByteOperations.unsafeWrap(sdr.getData()))
.build();
long readTime = System.currentTimeMillis() - start;
ShuffleServerMetrics.counterTotalReadTime.inc(readTime);
ShuffleServerMetrics.counterTotalReadDataSize.inc(sdr.getDataLength());
Expand All @@ -1211,12 +1217,6 @@ public void getLocalShuffleData(
"Successfully getShuffleData cost {} ms for shuffle data with {}",
readTime,
requestInfo);
reply =
GetLocalShuffleDataResponse.newBuilder()
.setStatus(status.toProto())
.setRetMsg(msg)
.setData(UnsafeByteOperations.unsafeWrap(sdr.getData()))
.build();
} catch (Exception e) {
status = StatusCode.INTERNAL_ERROR;
msg = "Error happened when get shuffle data for " + requestInfo + ", " + e.getMessage();
Expand Down

0 comments on commit 8c55030

Please sign in to comment.