linkedin / ambry

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

changing storeKeyconverter logic to count based logic #2817

Closed manbearpig1996 closed 4 months ago

manbearpig1996 commented 5 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