codelipenghui opened a new pull request #10824:
URL: https://github.com/apache/pulsar/pull/10824


   Fixes #10813
   The issue is introduced by #7266, it only affects the master branch.
   
   ### Motivation
   
   1. Add wrapperOffset to make sure get the correct batch size from the 
metadata
   2. Fix the issue that using (batch count / avgBatchSizePerMsg) to calculate 
messages for the consumer
      it should be (messages / avgBatchSizePerMsg)
   
   ### Verifying this change
   
        * The test case is to simulate dispatch batches with different batch 
size to the consumer.
        * 1. The consumer has 1000 available permits
        * 2. The producer send batches with different batch size
        *
        * According the batch average size dispatching, the broker will 
dispatch all the batches to the consumer
   
   ### Does this pull request potentially affect one of the following parts:
   
   *If `yes` was chosen, please highlight the changes*
   
     - Dependencies (does it add or upgrade a dependency): (no)
     - The public API: (no)
     - The schema: (no)
     - The default values of configurations: (no)
     - The wire protocol: (no)
     - The rest endpoints: (no)
     - The admin cli options: (no)
     - Anything that affects deployment: (no)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (no)
   


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