You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2018/01/26 23:05:26 UTC
[GitHub] merlimat opened a new pull request #1121: Remove stack traces from topic lookup errors during unloads
merlimat opened a new pull request #1121: Remove stack traces from topic lookup errors during unloads
URL: https://github.com/apache/incubator-pulsar/pull/1121
### Motivation
When unloading a topic or a namespace (eg: during graceful shutdown), the producer/consumer are disconnected and subsequent lookup are being rejected until the unload is completed.
During that time there can be a bunch of exception reported :
```
2018-01-26 14:25:08,628 - WARN - [pulsar-io-55-11:DestinationLookup@285] - Failed to lookup null for topic persistent://sample/standalone/ns1/tx-partition-4005 with error java.lang.IllegalStateException: Namespace bundle sample/standalone/ns1/0x40000000_0x80000000 is being unloaded
java.util.concurrent.CompletionException: java.lang.IllegalStateException: Namespace bundle sample/standalone/ns1/0x40000000_0x80000000 is being unloaded
at java.util.concurrent.CompletableFuture.encodeRelay(CompletableFuture.java:326)
at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:984)
at java.util.concurrent.CompletableFuture.thenCompose(CompletableFuture.java:2124)
at org.apache.pulsar.broker.namespace.NamespaceService.getBrokerServiceUrlAsync(NamespaceService.java:138)
at org.apache.pulsar.broker.lookup.DestinationLookup.lambda$4(DestinationLookup.java:260)
at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
at java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:669)
at java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:1997)
at org.apache.pulsar.broker.lookup.DestinationLookup.lookupDestinationAsync(DestinationLookup.java:256)
at org.apache.pulsar.broker.service.ServerCnx.handleLookup(ServerCnx.java:196)
at org.apache.pulsar.common.api.PulsarDecoder.channelRead(PulsarDecoder.java:106)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:310)
at io.netty.handler.codec.ByteToMessageDecoder.fireChannelRead(ByteToMessageDecoder.java:297)
at io.netty.handler.codec.ByteToMessageDecoder.callDecode(ByteToMessageDecoder.java:413)
at io.netty.handler.codec.ByteToMessageDecoder.channelRead(ByteToMessageDecoder.java:265)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.AbstractChannelHandlerContext.fireChannelRead(AbstractChannelHandlerContext.java:340)
at io.netty.channel.DefaultChannelPipeline$HeadContext.channelRead(DefaultChannelPipeline.java:1412)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:362)
at io.netty.channel.AbstractChannelHandlerContext.invokeChannelRead(AbstractChannelHandlerContext.java:348)
at io.netty.channel.DefaultChannelPipeline.fireChannelRead(DefaultChannelPipeline.java:943)
at io.netty.channel.nio.AbstractNioByteChannel$NioByteUnsafe.read(AbstractNioByteChannel.java:141)
at io.netty.channel.nio.NioEventLoop.processSelectedKey(NioEventLoop.java:645)
at io.netty.channel.nio.NioEventLoop.processSelectedKeysOptimized(NioEventLoop.java:580)
at io.netty.channel.nio.NioEventLoop.processSelectedKeys(NioEventLoop.java:497)
at io.netty.channel.nio.NioEventLoop.run(NioEventLoop.java:459)
at io.netty.util.concurrent.SingleThreadEventExecutor$5.run(SingleThreadEventExecutor.java:886)
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.IllegalStateException: Namespace bundle sample/standalone/ns1/0x40000000_0x80000000 is being unloaded
at org.apache.pulsar.broker.namespace.NamespaceService.lambda$3(NamespaceService.java:306)
at java.util.concurrent.CompletableFuture.uniAccept(CompletableFuture.java:656)
at java.util.concurrent.CompletableFuture.uniAcceptStage(CompletableFuture.java:669)
at java.util.concurrent.CompletableFuture.thenAccept(CompletableFuture.java:1997)
at org.apache.pulsar.broker.namespace.NamespaceService.findBrokerServiceUrl(NamespaceService.java:291)
at org.apache.pulsar.broker.namespace.NamespaceService.lambda$0(NamespaceService.java:138)
at java.util.concurrent.CompletableFuture.uniComposeStage(CompletableFuture.java:981)
... 31 more
```
### Modification
Suppress stack traces when we're getting `IllegalStateException` since it's an expected and normal condition.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
With regards,
Apache Git Services