Technoboy- commented on pull request #13337:
URL: https://github.com/apache/pulsar/pull/13337#issuecomment-1015000498


   > Emm,I running in standalone mode, I tested the latest code and still have 
some problems.
   > 
   > 1. Deleting a namespace may be return 500
   > 
   > ```
   > ➜  bin git:(master) ✗ ./pulsar-admin namespaces delete sample/ns1
   > 2021-12-16T16:51:07,550+0800 [AsyncHttpClient-7-1] WARN  
org.apache.pulsar.client.admin.internal.BaseResource - 
[http://localhost:8080/admin/v2/namespaces/sample/ns1?force=false] Failed to 
perform http delete request: javax.ws.rs.InternalServerErrorException: HTTP 500 
Internal Server Error
   > HTTP 500 Internal Server Error
   > ```
   > 
   > 2. Can still find the namespace after deleting it
   > 
   > ```
   > ➜  bin git:(master) ✗ ./pulsar-admin topics list sample/ns1
   > persistent://sample/ns1/__change_events
   > ```
   > 
   > 3. Broker print error log
   > 
   > ```
   > 2022-01-12T19:53:57,495+0800 
[bookkeeper-ml-scheduler-OrderedScheduler-0-0] ERROR 
org.apache.pulsar.broker.namespace.OwnedBundle - Failed to close topics under 
namespace sample/ns1/0x00000000_0x40000000
   > java.util.concurrent.CompletionException: java.lang.NullPointerException
   >    at 
java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1081)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) 
~[?:?]
   >    at 
java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610) 
~[?:?]
   >    at 
java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:791)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
 ~[?:?]
   >    at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
   >    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
   >    at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 [?:?]
   >    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
[?:?]
   >    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
[?:?]
   >    at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 [netty-common-4.1.72.Final.jar:4.1.72.Final]
   >    at java.lang.Thread.run(Thread.java:834) [?:?]
   > Caused by: java.lang.NullPointerException
   >    at 
org.apache.pulsar.broker.service.persistent.PersistentTopic.checkReplication(PersistentTopic.java:1386)
 ~[classes/:?]
   >    at 
org.apache.pulsar.broker.service.persistent.SystemTopic.checkReplication(SystemTopic.java:62)
 ~[classes/:?]
   >    at 
org.apache.pulsar.broker.service.BrokerService$2.lambda$openLedgerComplete$0(BrokerService.java:1377)
 ~[classes/:?]
   >    at 
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
 ~[?:?]
   >    ... 11 more
   > 2022-01-12T19:53:57,495+0800 
[bookkeeper-ml-scheduler-OrderedScheduler-0-0] WARN  
org.apache.pulsar.broker.service.ServerCnx - 
[/127.0.0.1:53755][persistent://sample/ns1/__change_events][reader-76d8cfb6b0] 
Failed to create consumer: consumerId=0, null
   > java.util.concurrent.CompletionException: java.lang.NullPointerException
   >    at 
java.util.concurrent.CompletableFuture.encodeThrowable(CompletableFuture.java:314)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture.completeThrowable(CompletableFuture.java:319)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1081)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) 
~[?:?]
   >    at 
java.util.concurrent.CompletableFuture.postFire(CompletableFuture.java:610) 
~[?:?]
   >    at 
java.util.concurrent.CompletableFuture$UniRun.tryFire(CompletableFuture.java:791)
 ~[?:?]
   >    at 
java.util.concurrent.CompletableFuture$Completion.run(CompletableFuture.java:478)
 ~[?:?]
   >    at 
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515) [?:?]
   >    at java.util.concurrent.FutureTask.run(FutureTask.java:264) [?:?]
   >    at 
java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:304)
 [?:?]
   >    at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) 
[?:?]
   >    at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) 
[?:?]
   >    at 
io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
 [netty-common-4.1.72.Final.jar:4.1.72.Final]
   >    at java.lang.Thread.run(Thread.java:834) [?:?]
   > Caused by: java.lang.NullPointerException
   >    at 
org.apache.pulsar.broker.service.persistent.PersistentTopic.checkReplication(PersistentTopic.java:1386)
 ~[classes/:?]
   >    at 
org.apache.pulsar.broker.service.persistent.SystemTopic.checkReplication(SystemTopic.java:62)
 ~[classes/:?]
   >    at 
org.apache.pulsar.broker.service.BrokerService$2.lambda$openLedgerComplete$0(BrokerService.java:1377)
 ~[classes/:?]
   >    at 
java.util.concurrent.CompletableFuture$UniCompose.tryFire(CompletableFuture.java:1072)
 ~[?:?]
   >    ... 11 mor
   > ```
   > 
   > I thought about it, `Terminate the topic` it may not solve the problem. 
Because terminate a topic does not prevent it from being created again.
   > 
   > Now, after terminate the topic, only the producer connection will be 
rejected, the consumer can still connect and consume, and the topic will still 
trigger automatic creation.
   
   Yes, we may need some other solution for it.


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to