apache / apache/pulsar

In the process of perf,Broker shutdown.

Open
#12,884 7 comments 0 reactions 0 assignees View on GitHub
lifecycle/stale type/bug
Dominant language
Java
Stars
15.3k
Forks
3.8k
Avg merge
1d 14h
Merged PRs (30d)
160

Description

### Broker logs
16:12:59.243 [BookKeeperClientWorker-OrderedExecutor-2-0] ERROR org.apache.bookkeeper.common.util.SafeRunnable - Unexpected throwable caught
java.lang.NullPointerException: null
at org.apache.bookkeeper.mledger.impl.OpAddEntry.lambda$handleAddFailure$0(OpAddEntry.java:291) ~[org.apache.pulsar-managed-ledger-2.8.1.jar:2.8.1]
at org.apache.bookkeeper.mledger.util.SafeRun$1.safeRun(SafeRun.java:32) ~[org.apache.pulsar-managed-ledger-2.8.1.jar:2.8.1]
at org.apache.bookkeeper.common.util.SafeRunnable.run(SafeRunnable.java:36) [org.apache.bookkeeper-bookkeeper-common-4.14.2.jar:4.14.2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_181]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_181]
at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30) [io.netty-netty-common-4.1.66.Final.jar:4.1.66.Final]
at java.lang.Thread.run(Thread.java:748) [?:1.8.0_181]

16:12:59.344 [pulsar-io-4-27] WARN org.apache.pulsar.broker.service.BrokerService - Namespace is being unloaded, cannot add topic persistent://my-tenant/my-namespace/test-partition-1
16:12:59.345 [pulsar-io-4-27] WARN org.apache.pulsar.broker.service.ServerCnx - [/192.168.149.32:43464][persistent://my-tenant/my-namespace/test-partition-1][sub-0] Failed to create consumer: consumerId=7, Namespace is being unloaded, cannot add topic persistent://my-tenant/my-namespace/test-partition-1

16:12:59.510 [pulsar-io-4-58] WARN org.apache.pulsar.broker.service.persistent.PersistentTopic - [persistent://my-tenant/my-namespace/test-partition-5] Attempting to subscribe to a fenced topic
16:12:59.510 [pulsar-io-4-58] WARN org.apache.pulsar.broker.service.ServerCnx - [/192.168.149.32:43516][persistent://my-tenant/my-namespace/test-partition-5][sub-0] Failed to create consumer: consumerId=20, Topic is temporarily unavailable

Contributor guide

Open the contributing guide

Research direction

Start with the broker log stack trace in OpAddEntry.java, especially handleAddFailure, then trace the related BrokerService, ServerCnx, and PersistentTopic messages during namespace unloading and topic fencing. Reproduce or correlate the shutdown sequence and determine the cause of the NullPointerException and failed consumer creation; done means the shutdown no longer produces these failures.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend, distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.