Github user JoshRosen commented on a diff in the pull request:
https://github.com/apache/spark/pull/11193#discussion_r52957505
--- Diff:
network/common/src/test/java/org/apache/spark/network/TestManagedBuffer.java ---
@@ -44,7 +44,7 @@ public TestManagedBuffer(int len) {
for (int i = 0; i < len; i ++) {
byteArray[i] = (byte) i;
}
- this.underlying = new
NettyManagedBuffer(Unpooled.wrappedBuffer(byteArray));
+ this.underlying = new
NettyManagedBuffer(Unpooled.wrappedBuffer(byteArray).retain());
--- End diff --
I think that the issue here is that other parts of the code were assuming
that the buffer passed to `NettyManagedBuffer` had a non-zero retain count; if
we don't add this `retain()` here then Netty will complain about calling
release() without holding any references.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]