jprieto-temporal opened a new pull request, #4709:
URL: https://github.com/apache/bookkeeper/pull/4709

   Main Issue: #2974
   
   ### Motivation
   
   When multiple journals are configured, BookKeeper selects a journal using 
ledgerId % numJournals. This works well when
   ledger IDs are random or sequential, but produces poor distribution when 
ledger IDs follow strided patterns (e.g., when
   multiple clients allocate IDs from disjoint ranges). Uneven journal 
utilization can cause hotspots and reduce write
   throughput.
   
   ### Changes
   
   - Add journalHashBasedSelection configuration option (default: false)
   - When enabled, use Fibonacci hashing on ledger IDs before journal selection
   - The hash function multiplies by the golden ratio constant and folds high 
bits into low bits to break predictable
   patterns
   - Add integration test verifying read/write correctness with hash-based 
selection
   


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