poorbarcode opened a new pull request, #22091:
URL: https://github.com/apache/pulsar/pull/22091

   ### Motivation
   
   Context:
   - The broker decreases the permits after delivering messages to the client.
     -  It only decreases the un-acked part for permits when delivering batched 
messages to the client.
   - The client acquires more permits after consuming messages.
     - **(Highlight)** It acquires the whole batch for permits even if it only 
received half of the batched message.
   
   Reproduce step:
   - The permits were initialized as `1000`
   - Send a batch message containing 100 single messages.
   - Ack a half of batched messages(`2` single messages).
   - Redeliver the batch message.
   - Receive the `98` messages left on the topic.
   - **(Highlight)** permits is `1002`.
   
   One our ENV, the permits went to `100,000+`(it was initialized as `50`)
   
   <img width="1103" alt="Screenshot 2024-02-21 at 22 55 42" 
src="https://github.com/apache/pulsar/assets/25195800/fc10e76a-585d-4ec3-b56b-04aca7e735b2";>
   
   
   ### Modifications
   
   - The client acquires more permits after consuming messages.
     - It acquires the half batch for permits if it only received half of the 
batched message.
   
   ### Documentation
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ] `doc` <!-- Your PR contains doc changes. -->
   - [ ] `doc-required` <!-- Your PR changes impact docs and you will update 
later -->
   - [x] `doc-not-needed` <!-- Your PR changes do not impact docs -->
   - [ ] `doc-complete` <!-- Docs have been already added -->
   
   ### Matching PR in forked repository
   
   PR in forked repository: x
   


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