Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Try to fix Netty leak with explicit read. #1638

Closed
wants to merge 1 commit into from

Conversation

He-Pin
Copy link
Member

@He-Pin He-Pin commented Dec 28, 2024

Motivation:
refs: #1634

Modification:
Do explicit reading instead.

Result:
Expect No leaks.

NOTE:
The code was right.

private[netty] abstract class NettyChannelHandlerAdapter extends SimpleChannelInboundHandler[ByteBuf]

will do auto-release.

@He-Pin He-Pin marked this pull request as draft December 28, 2024 16:44
@He-Pin He-Pin modified the milestones: 1.1.3, 1.2.0 Dec 28, 2024
@He-Pin He-Pin marked this pull request as ready for review December 28, 2024 17:13
@He-Pin He-Pin marked this pull request as draft December 28, 2024 17:16
@He-Pin
Copy link
Member Author

He-Pin commented Dec 28, 2024

Do local run with cluster/MultiJvm/test and -Dio.netty.leakDetection.level=PARANOID to find if it leaked.

@@ -36,7 +35,7 @@ private[netty] trait NettyHelpers {

protected def onOpen(@unused ctx: ChannelHandlerContext): Unit = ()

protected def onMessage(@unused ctx: ChannelHandlerContext, @unused msg: ByteBuf): Unit = ()
protected def onMessage(@unused ctx: ChannelHandlerContext, @unused msg: Array[Byte]): Unit = ()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there anything special about ByteBuf ? (;I don't know about Netty

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is just a Try, and will not be needed. the old code is actually right.

@He-Pin He-Pin removed this from the 1.2.0 milestone Dec 28, 2024
@He-Pin
Copy link
Member Author

He-Pin commented Dec 28, 2024

This should not be needed, the current code is right, thanks god :)

@He-Pin He-Pin closed this Dec 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants