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

zuston 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 8c550309d [#2298] fix(server): Correct the metric of 
grpc_get_local_shuffle_data_process_latency (#2299)
8c550309d is described below

commit 8c550309d57f8b59cde2a0e36f9a131a3345c6a6
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 227e92028..2a4f77e92 100644
--- 
a/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
+++ 
b/server/src/main/java/org/apache/uniffle/server/ShuffleServerGrpcService.java
@@ -1198,6 +1198,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());
@@ -1211,12 +1217,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