diff --git a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java index 0a5259284c..00c25e6720 100644 --- a/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java +++ b/internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java @@ -573,6 +573,12 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ List shuffleBlocks = Lists.newArrayList(); int partitionRequireSize = 0; for (ShuffleBlockInfo sbi : ptb.getValue()) { + if (sbi.getData().refCnt() == 0) { + throw new RssException( + "Detected a ShuffleBlockInfo with a released buffer (refCnt=0) for blockId[" + + sbi.getBlockId() + + "]."); + } shuffleBlocks.add( ShuffleBlock.newBuilder() .setBlockId(sbi.getBlockId())