zzzming opened a new pull request #684:
URL: https://github.com/apache/pulsar-client-go/pull/684


   ### Motivation
   
   A group of batch counters are not properly critical section protected in the 
producer's default_router. Read and update of these counters should be 
protected as a whole, instead of individually synchronized using Atomic access. 
Multiple goroutines can access and update these counters at the same time. 
Basically it is not thread safe. 
   
   
   ### Modifications
   
   The change use mutex lock to protect the entire counters during the batch 
partition decision making process.
   Minor improvement includes to evaluate message max size, byte size, and 
batch window on a needed basis.
   
   ### Verifying this change
   
   - [ v] Make sure that the change passes the CI checks.
   
   
   ### 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)
   
   ### Documentation
   
     - Does this pull request introduce a new feature? (/ no)
     - If yes, how is the feature documented? (not applicable )
   
   


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