linkedin / ambry

Distributed object store
https://github.com/linkedin/ambry/wiki
Apache License 2.0
1.74k stars 275 forks source link

changing storeKeyconverter logic to count based logic #2817

Closed manbearpig1996 closed 1 month ago

manbearpig1996 commented 2 months ago

Added tryDropCache for keys in StoreKeyConverter to try and drop some keys. Adding an AbstractStoreKeyConverter and implementing in current test classes of StoreKeyConverter to have same expected logic everywhere. AbstractStoreKeyConverter is using a counting cache logic for keys. Whenever a key is added its count will keep increasing, when tryDropCache is called for keys, count will decrease. Keys will be dropped, when count becomes 0. Rest of the behviour is same as expected