This is an automated email from the ASF dual-hosted git repository.

roryqi pushed a commit to branch branch-0.10
in repository https://gitbox.apache.org/repos/asf/incubator-uniffle.git

commit 7d07a9d1f7dc62cbd68108629be4a80b80d583ed
Author: Junfan Zhang <[email protected]>
AuthorDate: Wed Dec 18 11:53:49 2024 +0800

    [#2298] fix(server): Correct the metric of 
grpc_get_local_shuffle_data_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 <[email protected]>
---
 .../org/apache/uniffle/server/ShuffleServerGrpcService.java  | 12 ++++++------
 1 file changed, 6 insertions(+), 6 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 79206492a..d0b0213cd 100644
--- 
a/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
+++ 
b/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
@@ -1170,6 +1170,12 @@ public class ShuffleServerGrpcService extends 
ShuffleServerImplBase {
                       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());
@@ -1183,12 +1189,6 @@ public class ShuffleServerGrpcService extends 
ShuffleServerImplBase {
               "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();

Reply via email to