commit | 045d9aecd19d4502e6ec63085e3d4b0a59750334 | [log] [tgz] |
---|---|---|
author | RickyMa <rickyma@tencent.com> | Tue Feb 27 20:23:28 2024 +0800 |
committer | GitHub <noreply@github.com> | Tue Feb 27 20:23:28 2024 +0800 |
tree | 91ade3e98a46e3601933ce3855d3eae5ed8779ba | |
parent | a73dcb968ee3fde7170af300c4af238ab26c2de7 [diff] |
[#1546] fix(spark): NPE could happen before uncompressing after #1360 (#1547) ### What changes were proposed in this pull request? NPE cound happen before uncompressing after #1360 ### Why are the changes needed? For https://github.com/apache/incubator-uniffle/issues/1546 ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing UTs.
diff --git a/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java b/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java index e1b9789..88b2d22 100644 --- a/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java +++ b/client-spark/common/src/main/java/org/apache/spark/shuffle/reader/RssShuffleDataIterator.java
@@ -166,7 +166,7 @@ || !isSameMemoryType(uncompressedData, rawData)) { if (LOG.isDebugEnabled()) { - if (!isSameMemoryType(uncompressedData, rawData)) { + if (uncompressedData != null && !isSameMemoryType(uncompressedData, rawData)) { LOG.debug( "This should not happen that the temporary uncompressed data's memory type(isDirect:{}) " + "is not same with fetched data buffer(isDirect:{})",