Skip to content

Commit

Permalink
[apache#2298] fix(server): followup to correct the metric of grpc_get…
Browse files Browse the repository at this point in the history
…_local_shuffle_index_process_latency
  • Loading branch information
Junfan Zhang committed Dec 23, 2024
1 parent e7e191b commit c0a8721
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 c0a8721

Please sign in to comment.