Skip to content

Commit 5edf952

Browse files
authored
[#2517] fix(client): IllegalReferenceCountException about ShuffleBlockInfo (#2638)
### What changes were proposed in this pull request? Fix `IllegalReferenceCountException` about ShuffleBlockInfo ### Why are the changes needed? for #2517 ### Does this PR introduce any user-facing change? No. ### How was this patch tested? current UT
1 parent 42c5d9f commit 5edf952

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

internal-client/src/main/java/org/apache/uniffle/client/impl/grpc/ShuffleServerGrpcClient.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -573,6 +573,12 @@ public RssSendShuffleDataResponse sendShuffleData(RssSendShuffleDataRequest requ
573573
List<ShuffleBlock> shuffleBlocks = Lists.newArrayList();
574574
int partitionRequireSize = 0;
575575
for (ShuffleBlockInfo sbi : ptb.getValue()) {
576+
if (sbi.getData().refCnt() == 0) {
577+
throw new RssException(
578+
"Detected a ShuffleBlockInfo with a released buffer (refCnt=0) for blockId["
579+
+ sbi.getBlockId()
580+
+ "].");
581+
}
576582
shuffleBlocks.add(
577583
ShuffleBlock.newBuilder()
578584
.setBlockId(sbi.getBlockId())

0 commit comments

Comments
 (0)