devinbost commented on issue #6332: (Flaky-test) Intermittent failure of ProxyParserTest.testRegexSubscription URL: https://github.com/apache/pulsar/issues/6332#issuecomment-590719161 My hypothesis was right. I added these two methods to ProxyConnection: ``` @Override protected void handleSubscribe(PulsarApi.CommandSubscribe subscribe) { LOG.info("ERROR: We are calling handleSubscribe(..) on ProxyConnection! This shouldn't happen!"); StringWriter sw = new StringWriter(); new Throwable("").printStackTrace(new PrintWriter(sw)); String stackTrace = sw.toString(); LOG.info("Stacktrace is: " + stackTrace); super.handleSubscribe(subscribe); } @Override protected void handleProducer(PulsarApi.CommandProducer producer) { LOG.info("ERROR: We are calling handleProducer(..) on ProxyConnection! This shouldn't happen!"); StringWriter sw = new StringWriter(); new Throwable("").printStackTrace(new PrintWriter(sw)); String stackTrace = sw.toString(); LOG.info("Stacktrace is: " + stackTrace); super.handleProducer(producer); } ``` because I suspected that these methods were incorrectly getting called on the ProxyConnection type instead of getting forwarded like they're supposed to, and this is what appeared in the log: ``` 07:03:06.668 [pulsar-proxy-io-39-2:org.apache.pulsar.proxy.server.ProxyConnection@391] INFO org.apache.pulsar.proxy.server.ProxyConnection - ERROR: We are calling handleSubscribe(..) on ProxyConnection! This shouldn't happen! 07:03:06.668 [pulsar-proxy-io-39-2:org.apache.pulsar.proxy.server.ProxyConnection@395] INFO org.apache.pulsar.proxy.server.ProxyConnection - Stacktrace is: java.lang.Throwable: at org.apache.pulsar.proxy.server.ProxyConnection.handleSubscribe(ProxyConnection.java:393) at org.apache.pulsar.common.protocol.PulsarDecoder.channelRead(PulsarDecoder.java:216) at org.apache.pulsar.proxy.server.ProxyConnection.channelRead(ProxyConnection.java:182) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:326) at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:300) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:352) at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1422) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:374) at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:360) at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:931) at io.netty.channel.epoll.AbstractEpollStreamChannel$EpollStreamUnsafe.epollInReady(AbstractEpollStreamChannel.java:792) at io.netty.channel.epoll.EpollEventLoop.processReady(EpollEventLoop.java:502) at io.netty.channel.epoll.EpollEventLoop.run(EpollEventLoop.java:407) at io.netty.util.concurrent.SingleThreadEventExecutor$6.run(SingleThreadEventExecutor.java:1050) at io.netty.util.internal.ThreadExecutorMap$2.run(ThreadExecutorMap.java:74) at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) at java.lang.Thread.run(Thread.java:748) ``` The new error message that I added is most instructive: `org.apache.pulsar.proxy.server.ProxyConnection - ERROR: We are calling handleSubscribe(..) on ProxyConnection! This shouldn't happen!`
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
