lhotari commented on issue #10813:
URL: https://github.com/apache/pulsar/issues/10813#issuecomment-854116737


   Thanks for the good issue report @eolivelli !
   
   I was able to reproduce with 30 partitions and 100000 messages in a single 
node cluster (setup documented in 
https://github.com/lhotari/pulsar-playground/tree/master/test-env).
   
   Documenting the commands I used:
   ```
   pulsar-admin namespaces set-retention -s 3T -t 3w public/default
   pulsar-admin topics create-partitioned-topic -p 30 test
   pulsar-perf consume -s nb -st Shared test
   pulsar-perf produce -r 10000 -m 100000 -mk random test
   java -cp ".:$HOME/workspace-pulsar/apache-pulsar-2.7.2/lib/*" 
SimpleConsumeMain 
pulsar://pulsar-testenv-deployment-broker.pulsar-testenv.svc.cluster.local:6650/
 nb test
   ```
   
   Deleting the subscription (to re-test, could also use new subscription name):
   ```
   pulsar-admin topics unsubscribe -s nb test
   ```
   
   Script to get stats:
   ```
   { for i in $(seq 0 29);do echo $i; pulsar-admin topics stats 
test-partition-$i; done; } | tee stats.txt
   ```
   internal stats
   ```
   { for i in $(seq 0 29);do echo $i; pulsar-admin topics stats-internal 
test-partition-$i; done; } | tee stats_internal.txt
   ```
   
   The topics stats includes negative permits:
   ```
   ❯ grep availablePermits stats.txt
           "availablePermits" : 434,
           "availablePermits" : 0,
           "availablePermits" : 829,
           "availablePermits" : -2,
           "availablePermits" : 0,
           "availablePermits" : 594,
           "availablePermits" : 766,
           "availablePermits" : 0,
           "availablePermits" : 849,
           "availablePermits" : 387,
           "availablePermits" : 799,
           "availablePermits" : 421,
           "availablePermits" : 552,
           "availablePermits" : 0,
           "availablePermits" : 0,
           "availablePermits" : 0,
           "availablePermits" : -1,
           "availablePermits" : -1,
           "availablePermits" : -6,
           "availablePermits" : 824,
           "availablePermits" : 986,
           "availablePermits" : 308,
           "availablePermits" : 541,
           "availablePermits" : 715,
           "availablePermits" : 913,
           "availablePermits" : 784,
           "availablePermits" : 602,
           "availablePermits" : 766,
           "availablePermits" : 559,
           "availablePermits" : 354,
   ```
   
   Could negative permits be a problem?
   
   
   
   
   


-- 
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:
[email protected]


Reply via email to