RobertIndie opened a new issue, #186:
URL: https://github.com/apache/pulsar-client-cpp/issues/186

   ### Search before asking
   
   - [X] I searched in the 
[issues](https://github.com/apache/pulsar-client-cpp/issues) and found nothing 
similar.
   
   
   ### Version
   
   96507cecdc90f10eca5febc48a0623f72d338615
   
   ### Minimal reproduce step
   
   * Create a partitioned topic
   * Create a partitioned producer
   * Expand the partitioned topic
   * Close the partitioned producer. It will hang out here due to the deadlock.
   
   Here is the code to help reproduce:
   ```cpp
   const std::string topic = "my-topic";
   
   
   int res = makePutRequest(topicOperateUrl, "2");
   ASSERT_TRUE(res == 204 || res == 409) << "res: " << res;
   
   ClientConfiguration clientConf;
   clientConf.setPartititionsUpdateInterval(1);
   Client client(serviceUrl, clientConf);
   ProducerConfiguration conf;
   Producer producer;
   client.createProducer(topic, conf, producer);
   PartitionedProducerImpl& partitionedProducer = 
PulsarFriend::getPartitionedProducerImpl(producer);
   
   // Operation: Update the partitions to 3.
   
   producer.close(); // Deadlock here.
   client.close();
   ```
   Here I use the TestUtils to create the partitioned topic. You can just put 
the code to the C++ client test.
   
   ### What did you expect to see?
   
   No deadlock
   
   ### What did you see instead?
   
   Hang out when closing the producer
   
   ### Anything else?
   
   _No response_
   
   ### Are you willing to submit a PR?
   
   - [X] I'm willing to submit a PR!


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