StevenLuMT opened a new pull request, #3522:
URL: https://github.com/apache/bookkeeper/pull/3522

   Descriptions of the changes in this PR:
   
   ### Motivation
   
   change masterKeyCache to Fixed size,duration to prevent memory from rising 
because the number of ledger grow too fast
   for the masterKeyCache does not need to be very large, even if the 
masterKeyCache cannot be hit, there is a memory cache of 
org.apache.bookkeeper.bookie.storage.ldb.LedgerMetadataIndex#ledgers as the 
bottom line.
   
   <img width="889" alt="image" 
src="https://user-images.githubusercontent.com/42990025/194751087-c4152002-0b99-4a16-acf9-d1d1bad25a5c.png";>
   
   
   When the following scenarios occur, this problem will become more obvious:
       1)  when pulsar carries tens of millions of topics
       2)  the length of masterKey is 20 
       3)  the number of ledger increases by 50 per second
   <img width="2239" alt="image" 
src="https://user-images.githubusercontent.com/42990025/194750852-eee0d6cd-29fa-4bcb-9dc4-6261cc1309f4.png";>
   the memory of masterKeyCache will increase by  about 100MB every day
   
   
   ### Changes
   
   1.  change masterKeyCache from fix size map(ConcurrentLongHashMap) to 
dynamic size(60 miniutes guava cache)
   


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