-
Notifications
You must be signed in to change notification settings - Fork 526
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
curvefs/client: local cache policy optimization #2025
Comments
assign to me |
我看了一下代码,这个 issue 的解决思路我已经有了。 |
thanks for your contribution. |
use the WriteReadDirect directly is sync. May I should refer to the desgin of cacheread + cachewrite (function |
Yes, you're right, Let's do it. |
Signed-off-by: tangruilin <[email protected]>
Signed-off-by: tangruilin <[email protected]>
Is your feature request related to a problem? (你需要的功能是否与某个问题有关?)
when we set diskCache.diskCacheType only cacheread, then the write will not be cached in cacheread.
now, we need to cached the obj after write
Describe the solution you'd like (描述你期望的解决方法)
we have three strategies of the cache policy:
diskCache.diskCacheType=0 : no cache, we will write the obj to s3 directly, and read the obj from s3 directly.
diskCache.diskCacheType=1 : only cacheread, we cache the read s3 data to the read cache directory.
diskCache.diskCacheType=2 : cacheread + cachewrite, we cache the data we want to write to the write cache directory and upload it asynchronously to s3, at the same time, we're going to cache the write data to the read cache directory ;
we cache the read s3 data to the read cache directory
2 What are we going to do with this task
in DataCache::Flush, if the diskCache.diskCacheType is cacheread, we can call WriteReadDirect to cached the data in cachedread
The text was updated successfully, but these errors were encountered: