codertmy commented on PR #15330:
URL: https://github.com/apache/pulsar/pull/15330#issuecomment-1110604869

   It's a concurrent issue.
   Thread A : (IO thread)
   1. Receive msg from broker
   2. incomingMessages.offer(message)
   3. scaleReceiverQueueHint.set(getAvailablePermits() + 
incomingMessages.size() >= getCurrentReceiverQueueSize());
   
   Thread B: (main test thread)
   1. producer.send message
   2. consumer.receive message 
   If ThreadB.2 happen between ThreadA.2 and ThreadA.3, 
`scaleReceiverQueueHint` won't be set to true.


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