This is an automated email from the ASF dual-hosted git repository.
roryqi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git
The following commit(s) were added to refs/heads/master by this push:
new 1c56e74c9 [#2298] fix(server): followup to correct the metric of
grpc_get_local_shuffle_index_process_latency (#2302)
1c56e74c9 is described below
commit 1c56e74c9e08873874a961117f7efa1b8f0b368b
Author: Junfan Zhang <[email protected]>
AuthorDate: Tue Dec 24 11:54:45 2024 +0800
[#2298] fix(server): followup to correct the metric of
grpc_get_local_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 <[email protected]>
---
.../org/apache/uniffle/server/ShuffleServerGrpcService.java | 13 ++++++-------
1 file changed, 6 insertions(+), 7 deletions(-)
diff --git
a/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
b/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
index 2a4f77e92..9c32e8621 100644
---
a/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
+++
b/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
@@ -1322,6 +1322,12 @@ public class ShuffleServerGrpcService extends
ShuffleServerImplBase {
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()
@@ -1331,13 +1337,6 @@ public class ShuffleServerGrpcService extends
ShuffleServerImplBase {
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) {