titan icon indicating copy to clipboard operation
titan copied to clipboard

add prioritized cache wrapper

Open haoxiang47 opened this issue 5 years ago • 4 comments

add a prioritized cache wrapper, for this issue: https://github.com/tikv/titan/issues/127

haoxiang47 avatar Feb 21 '20 14:02 haoxiang47

@yiwu-arbug sorry for a little late, I have update this PR to add a wrapper called PrioritizedCache, has two function HighPriCacheInsert and LowPriCacheInsert which can insert high and low cache priorized regardless of user provided option, and a interface GetCache to return the Cache ptr

haoxiang47 avatar Feb 21 '20 15:02 haoxiang47

Codecov Report

Merging #142 into master will increase coverage by 0.02%. The diff coverage is n/a.

@@            Coverage Diff             @@
##           master     #142      +/-   ##
==========================================
+ Coverage   85.49%   85.52%   +0.02%     
==========================================
  Files          45       45              
  Lines        3419     3419              
==========================================
+ Hits         2923     2924       +1     
+ Misses        496      495       -1

codecov-io avatar Feb 23 '20 09:02 codecov-io

@yiwu-arbug I have updated the code, please review again

haoxiang47 avatar Feb 29 '20 09:02 haoxiang47

Mind adding some very simple unit test? Like have a mock underlying Cache object that checks what's the priority pass to it on Insert.

yiwu-arbug avatar Mar 02 '20 23:03 yiwu-arbug

As blob-specific cache priority is introduced, close it https://github.com/tikv/rocksdb/pull/354

Connor1996 avatar Jan 31 '24 07:01 Connor1996