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


   ### Motivation
   
   Currently, the `ManagedLedgerInfo` contains offload context info, if there 
are too many ledgers in one ManagedLedger, a Zookeeper ZNode data will 
increase, it's hard for Zookeeper to manage these data. We could compress the 
`ManagedLedgerInfo` data, this will decrease the data size.
   
   For example, if one `ManagedLedgerInfo` contains 30000 ledgers and each 
`LedgerInfo` contains offload context, the uncompressed data size is about 6MB, 
after compress with ZSTD, the compression data size could be decreased to about 
1.3MB.
   
   ### Modifications
   
   Add a `ManagedLedgerInfoMetadata` before `ManagedLedgerInfo`, the data 
structure as below.
   
   ```
   [MAGIC_NUMBER] (4) + [METADATA_SIZE] (2) + [METADATA_PAYLOAD] + 
[MANAGED_LEDGER_INFO_PAYLOAD]
   ```
   
   ### Verifying this change
   
   Verify compress and uncompress `ManagedLedgerInfo` data.
   
   ### 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
   
   #### For committer
   
   For this PR, do we need to update docs?
   
   - If yes,
     
     - if you update docs in this PR, label this PR with the `doc` label.
     
     - if you plan to update docs later, label this PR with the `doc-required` 
label.
   
     - if you need help on updating docs, create a follow-up issue with the 
`doc-required` label.
     
   - If no, label this PR with the `no-need-doc` label and explain why.
   
   


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