Skip to content

Commit

Permalink
[#2298] fix(server): followup to correct the metric of grpc_get_local…
Browse files Browse the repository at this point in the history
…_shuffle_index_process_latency (#2302)

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

followup to correct the metric of grpc_get_local_shuffle_index

### Why are the changes needed?

Fix: #2298 

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

No.

### How was this patch tested?

Co-authored-by: Junfan Zhang <zhangjunfan@qiyi.com>
  • Loading branch information
zuston and Junfan Zhang authored Dec 24, 2024
1 parent e7e191b commit 1c56e74
Showing 1 changed file with 6 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1322,6 +1322,12 @@ public void getLocalShuffleIndex(
ShuffleServerMetrics.gaugeReadLocalIndexFileBufferSize.inc(assumedFileSize);
GetLocalShuffleIndexResponse.Builder builder =
GetLocalShuffleIndexResponse.newBuilder().setStatus(status.toProto()).setRetMsg(msg);
builder.setIndexData(UnsafeByteOperations.unsafeWrap(data));
builder.setDataFileLen(shuffleIndexResult.getDataFileLen());
builder.addAllStorageIds(
Arrays.stream(shuffleIndexResult.getStorageIds())
.boxed()
.collect(Collectors.toList()));
long readTime = System.currentTimeMillis() - start;
shuffleServer
.getGrpcMetrics()
Expand All @@ -1331,13 +1337,6 @@ public void getLocalShuffleIndex(
readTime,
data.remaining(),
requestInfo);

builder.setIndexData(UnsafeByteOperations.unsafeWrap(data));
builder.setDataFileLen(shuffleIndexResult.getDataFileLen());
builder.addAllStorageIds(
Arrays.stream(shuffleIndexResult.getStorageIds())
.boxed()
.collect(Collectors.toList()));
auditContext.withReturnValue("len=" + shuffleIndexResult.getDataFileLen());
reply = builder.build();
} catch (FileNotFoundException indexFileNotFoundException) {
Expand Down

0 comments on commit 1c56e74

Please sign in to comment.