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

Test Flaky test #2276

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
import io.netty.buffer.Unpooled;
import io.netty.channel.ChannelHandlerContext;
import io.netty.channel.ChannelInboundHandlerAdapter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.apache.uniffle.common.exception.RssException;
import org.apache.uniffle.common.netty.protocol.Message;
Expand All @@ -47,6 +49,7 @@
* method.
*/
public class TransportFrameDecoder extends ChannelInboundHandlerAdapter implements FrameDecoder {
private static final Logger LOG = LoggerFactory.getLogger(TransportFrameDecoder.class);
private int msgSize = -1;
private int bodySize = -1;
private Message.Type curType = Message.Type.UNKNOWN_TYPE;
Expand Down Expand Up @@ -199,6 +202,12 @@ public void handlerRemoved(ChannelHandlerContext ctx) throws Exception {
// - When the Channel becomes inactive
// - When the decoder is removed from the ChannelPipeline
for (ByteBuf b : buffers) {
LOG.warn("Check NettyManagedBuffer release");
LOG.warn(Thread.currentThread().getName());
LOG.warn(this.toString());
LOG.warn(b.toString());
LOG.warn("size: " + b.readableBytes());
LOG.warn("Check decoder release stack tree", new Throwable());
b.release();
}
buffers.clear();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,11 @@

import io.netty.buffer.ByteBuf;
import io.netty.buffer.Unpooled;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

public class NettyManagedBuffer extends ManagedBuffer {
private static final Logger LOG = LoggerFactory.getLogger(NettyManagedBuffer.class);

public static final NettyManagedBuffer EMPTY_BUFFER =
new NettyManagedBuffer(Unpooled.EMPTY_BUFFER);
Expand Down Expand Up @@ -56,6 +59,12 @@ public ManagedBuffer retain() {

@Override
public ManagedBuffer release() {
LOG.warn("Check NettyManagedBuffer release");
LOG.warn(Thread.currentThread().getName());
LOG.warn(this.toString());
LOG.warn(this.buf.toString());
LOG.warn("size: " + this.buf.readableBytes());
LOG.warn("Check NettyManagedBuffer release stack tree", new Throwable());
buf.release();
return this;
}
Expand Down
Loading