This is an automated email from the ASF dual-hosted git repository.
roryqi 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 726a0edf [#1155] fix(netty):
io.netty.util.internal.OutOfDirectMemoryError. (#1151)
726a0edf is described below
commit 726a0edf1b9d8cbb112d69a0163645e8802ef91b
Author: Xianming Lei <[email protected]>
AuthorDate: Thu Aug 17 19:55:30 2023 +0800
[#1155] fix(netty): io.netty.util.internal.OutOfDirectMemoryError. (#1151)
### What changes were proposed in this pull request?
Fix io.netty.util.internal.OutOfDirectMemoryError.
### Why are the changes needed?
Fix io.netty.util.internal.OutOfDirectMemoryError.
### Does this PR introduce _any_ user-facing change?
No.
### How was this patch tested?
Existing UTs.
Co-authored-by: leixianming <[email protected]>
---
.../main/java/org/apache/uniffle/common/netty/protocol/Decoders.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/common/src/main/java/org/apache/uniffle/common/netty/protocol/Decoders.java
b/common/src/main/java/org/apache/uniffle/common/netty/protocol/Decoders.java
index df9f8203..db6c2a00 100644
---
a/common/src/main/java/org/apache/uniffle/common/netty/protocol/Decoders.java
+++
b/common/src/main/java/org/apache/uniffle/common/netty/protocol/Decoders.java
@@ -23,6 +23,7 @@ import java.util.Map;
import com.google.common.collect.Lists;
import com.google.common.collect.Maps;
import io.netty.buffer.ByteBuf;
+import io.netty.buffer.Unpooled;
import org.apache.uniffle.common.BufferSegment;
import org.apache.uniffle.common.ShuffleBlockInfo;
@@ -45,7 +46,9 @@ public class Decoders {
int shuffleId = byteBuf.readInt();
long crc = byteBuf.readLong();
long taskAttemptId = byteBuf.readLong();
- ByteBuf data = ByteBufUtils.readSlice(byteBuf);
+ int dataLength = byteBuf.readInt();
+ ByteBuf data = Unpooled.directBuffer(dataLength);
+ data.writeBytes(byteBuf, dataLength);
int lengthOfShuffleServers = byteBuf.readInt();
List<ShuffleServerInfo> serverInfos = Lists.newArrayList();
for (int k = 0; k < lengthOfShuffleServers; k++) {