BewareMyPower opened a new issue, #22136:
URL: https://github.com/apache/pulsar/issues/22136

   ### Search before asking
   
   - [X] I searched in the [issues](https://github.com/apache/pulsar/issues) 
and found nothing similar.
   
   
   ### Version
   
   Pulsar 3.1.2
   
   ### Minimal reproduce step
   
   Run the `ExtensibleLoadManagerTest` in 
https://github.com/apache/pulsar-client-cpp
   
   Before running the test, you should start the services.
   
   ```
       docker compose -f tests/extensibleLM/docker-compose.yml up -d
       docker compose -f tests/blue-green/docker-compose.yml up -d
   ```
   
   ### What did you expect to see?
   
   The test passed
   
   ### What did you see instead?
   
   There is a small chance to see `Consumer.receive` with a short timeout (e.g. 
5 seconds) failed. The root cause is that topic unload takes too long to 
complete and I found some errors in broker.
   
   Broker:
   
   ```
   2024-02-27T14:19:07,593+0000 [broker-client-shared-internal-executor-5-1] 
WARN  org.apache.pulsar.broker.service.SystemTopicBasedTopicPoliciesService - 
Read more topic policies exception, close the read now!
   java.util.concurrent.CompletionException: 
org.apache.pulsar.client.api.PulsarClientException$AlreadyClosedException: The 
consumer which subscribes the topic 
persistent://public/unload-test/__change_events with subscription name 
reader-925e9dacef was already closed when cleaning and closing the consumers
   ...
   2024-02-27T14:19:43,096+0000 [broker-client-shared-internal-executor-5-1] 
WARN  org.apache.pulsar.broker.service.SystemTopicBasedTopicPoliciesService - 
Read more topic policies exception, close the read now!
   java.util.concurrent.CompletionException: 
org.apache.pulsar.client.api.PulsarClientException$AlreadyClosedException: 
Consumer already closed
   ```
   
   Client (504 HTTP error):
   
   ```
   2024-02-27 22:19:07.794 INFO  [0x1e9aa2100] ExtensibleLoadManagerTest:190 | 
before lookup 
responseData:{"brokerUrl":"pulsar://broker-2:6650","httpUrl":"http://broker-2:8080","nativeUrl":"pulsar://broker-2:6650","brokerUrlSsl":""},unload
 
url:http://localhost:8080/admin/v2/namespaces/public/unload-test/0x00000000_0xffffffff/unload?destinationBroker=broker-1:8080,lookupCountBeforeUnload:2
   ...
   2024-02-27 22:19:37.817 INFO  [0x1e9aa2100] ExtensibleLoadManagerTest:192 | 
unload res:504
   ```
   
   > Note: the timestamp in broker is 8 hours before the timestamp in client
   
   ### Anything else?
   
   
[unload-too-long.tar.gz](https://github.com/apache/pulsar/files/14421194/unload-too-long.tar.gz)
   
   
   ### Are you willing to submit a PR?
   
   - [ ] 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