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 2021/12/29 07:57:52 UTC

[GitHub] [pulsar] zymap opened a new issue #13551: NPE when reset-cursor at a non-existent topic

zymap opened a new issue #13551:
URL: https://github.com/apache/pulsar/issues/13551


   **Describe the bug**
   An NPE will appear when reset-cursor at a non-existent topic. In the old version, we are throw topic is not found error to the client, I think we should keep that behavior.
   
   **To Reproduce**
   Steps to reproduce the behavior:
   1. `docker pull apachepulsar/pulsar-all:2.9.1`
   2. `docker run --name pulsar -it  apachepulsar/pulsar-all:2.9.1 bash`
   3. enter the docker to start up pulsar standalone
   4. reset cursor : `bin/pulsar-admin topics reset-cursor non-existing -s sub`
   
   **Expected behavior**
   Get topic not found exception.
   
   
   **Desktop (please complete the following information):**
    - OS: [e.g. iOS]
   
   **Additional context**
   Pulsar Version: 2.9.1
   
   Broker error:
   ```
   2021-12-29T07:53:29,951+0000 [metadata-store-19-1] WARN  org.apache.pulsar.broker.admin.impl.PersistentTopicsBase - [null][persistent://public/default/non-existing] Failed to reset cursor on subscription sub to time 1640764318176
   java.lang.NullPointerException: null
   	at org.apache.pulsar.broker.web.RestException.getExceptionData(RestException.java:44) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
   	at org.apache.pulsar.broker.web.RestException.getResponse(RestException.java:81) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
   	at org.apache.pulsar.broker.web.RestException.<init>(RestException.java:57) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
   	at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.getTopicReference(PersistentTopicsBase.java:3613) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
   	at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.internalResetCursorForNonPartitionedTopic(PersistentTopicsBase.java:1966) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
   	at org.apache.pulsar.broker.admin.impl.PersistentTopicsBase.lambda$internalResetCursor$89(PersistentTopicsBase.java:1946) ~[org.apache.pulsar-pulsar-broker-2.9.1.jar:2.9.1]
   	at java.util.concurrent.CompletableFuture$UniAccept.tryFire(CompletableFuture.java:714) ~[?:?]
   	at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:506) ~[?:?]
   	at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:2073) ~[?:?]
   	at org.apache.pulsar.metadata.impl.ZKMetadataStore.lambda$null$7(ZKMetadataStore.java:158) ~[org.apache.pulsar-pulsar-metadata-2.9.1.jar:2.9.1]
   	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) [io.netty-netty-common-4.1.72.Final.jar:4.1.72.Final]
   	at java.lang.Thread.run(Thread.java:829) [?:?]
   ```
   
   Client error:
   
   ```
   root@a4b1093e63a4:/pulsar# bin/pulsar-admin topics reset-cursor non-existing -s sub --time 1m
   HTTP 500 Internal Server Error
   
   Reason: HTTP 500 Internal Server Error
   ```
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] codelipenghui closed issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
codelipenghui closed issue #13551:
URL: https://github.com/apache/pulsar/issues/13551


   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] mattisonchao removed a comment on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
mattisonchao removed a comment on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1004486758


   > 
   
   By the way, null cause check is also useful. 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zymap commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
zymap commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1004490671


   make sense to me


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] mattisonchao commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1003225651


   @zymap 
   
   Yes, i can do that. 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] mattisonchao commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1004486758


   > 
   
   By the way, null cause check is also useful. 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] github-actions[bot] commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
github-actions[bot] commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1051437751


   The issue had no activity for 30 days, mark with Stale label.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zymap commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
zymap commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1003231229


   Thanks a lot!


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zymap commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
zymap commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1004481620


   I think we need to figure out the root cause of why the zk is always timeout. And then check the corresponding response to return to the client.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] mattisonchao commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1004487164


   > I think we need to figure out the root cause of why the zk is always timeout. And then check the corresponding response to return to the client.
   
   Yes, find root cause is more important. but null cause check is also useful i think.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] zymap commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
zymap commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1003222501


   The delete compacted topic and delete subscription also have a similar problem, would you like to fix that?


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] hangc0276 commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
hangc0276 commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1002632920


   @mattisonchao I have assigned this issue to you, Thanks for your help.


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] mattisonchao commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1002450128


   i can work on 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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] mattisonchao commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1003279509


   > The delete compacted topic and delete subscription also have a similar problem, would you like to fix that?
   
   #13551 can fix NPE.
   
   But the test in https://github.com/streamnative/pulsarctl/pull/544 maybe we need to do some change.
   Because of this issue cause by ZK sessionTimeout, the real server internal error.
   
   What do you think about this? 


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [pulsar] mattisonchao commented on issue #13551: NPE when reset-cursor at a non-existent topic

Posted by GitBox <gi...@apache.org>.
mattisonchao commented on issue #13551:
URL: https://github.com/apache/pulsar/issues/13551#issuecomment-1003232077


   It’s my pleasure.
   
   > On Dec 31, 2021, at 9:12 AM, Yong Zhang ***@***.***> wrote:
   > 
   > 
   > Thanks a lot!
   > 
   > —
   > Reply to this email directly, view it on GitHub <https://github.com/apache/pulsar/issues/13551#issuecomment-1003231229>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AR2NWC3IYMP7HW72LZAYEILUTT7QPANCNFSM5K5PGWBA>.
   > Triage notifications on the go with GitHub Mobile for iOS <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675> or Android <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>. 
   > You are receiving this because you were mentioned.
   > 
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org