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 227e920280..2a4f77e921 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 void getLocalShuffleData( 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 void getLocalShuffleData( "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();