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 2019/09/23 13:48:39 UTC

[GitHub] [pulsar] ivankelly opened a new issue #5259: Calling statsInternal can cause topic creation to fail

ivankelly opened a new issue #5259: Calling statsInternal can cause topic creation to fail
URL: https://github.com/apache/pulsar/issues/5259
 
 
   **Describe the bug**
   When creating a topic, if there is some other client querying stats (or probably many other things), then the creation can fail.
   
   This is because of how BrokerService ensures that only one client can create the topic at a time. A future is inserted into a map for the topic. However, the computation for this future differs depending on where the call to get the topic comes from. If it comes from the admin interface, then it doesn't create the topic if missing. If it comes from producer creation, then it does create the topic if missing.
   
   The problem occurs when a call comes in from the admin interface to get the topic, the future is inserted, then a call to get the topic comes in from producer creation. Producer creation will receive the previously saved future back which will not create the topic if missing, consequently failing the producer creation.
   
   **To Reproduce**
   Run this test case:
   https://github.com/ivankelly/pulsar/commit/bda83c5321e47114f0e4b3742e2f6e39667a99cf
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services