You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pulsar.apache.org by GitBox <gi...@apache.org> on 2022/04/03 17:56:46 UTC

[GitHub] [pulsar] gaoran10 opened a new pull request #15015: [enh][transaction] Optimize to reuse transaction buffer snapshot writer

gaoran10 opened a new pull request #15015:
URL: https://github.com/apache/pulsar/pull/15015


   ### Motivation
   
   The transaction buffer(short for TB) snapshot topic is used to persistent snapshot data for TB, the snapshot can reduce read data when recovering.
   
   Currently, if enable the transaction feature, every topic will create a TB snapshot producer, the topic of the producer is a namespace system topic, so we don't need to create a producer for every topic, one producer per namespace is enough.
   
   ### Modification
   
   Add a new inner class `ReferenceCountedWriter`, it extends `AbstractReferenceCounted`, if the `ReferenceCountedWriter` does not exist, it will be initialized, or else its reference count will be increased, after the reference count reduces to 0, it will be removed from map-cache.
   
   ### Verifying this change
   
   Adjust existing tests to cover this change.
   
   ### 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
   
   Check the box below or label this PR directly (if you have committer privilege).
   
   Need to update docs? 
   
   - [ ] `doc-required` 
     
     (If you need help on updating docs, create a doc issue)
     
   - [x] `no-need-doc` 
     
     (Please explain why)
     
   - [ ] `doc` 
     
     (If this PR contains doc changes)
   
   
   


-- 
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: commits-unsubscribe@pulsar.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org