Skip to content
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

[Feature] Doris FileCache memory info vs disk info consistency check #41280

Open
2 of 3 tasks
freemandealer opened this issue Sep 25, 2024 · 0 comments
Open
2 of 3 tasks
Labels
doris-future kind/feature Categorizes issue or PR as related to a new feature.

Comments

@freemandealer
Copy link
Contributor

freemandealer commented Sep 25, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

Description

Occasionally, we found that there have been cases of disk cache data escaping from the management of Doris file cache, causing disk space leaks. To make it easier for debugging, we need a checking tool that compares the contents in the Doris file cache memory management structure with the current disk contents to identify the differences between the two (which are potential problematic data).

To better understand how file cache works, please refer to: https://doris.apache.org/zh-CN/docs/dev/compute-storage-decoupled/file-cache/ and https://www.bilibili.com/video/BV1ath9eGEqL

Basic Ideas

Coz the cache is changing rapidly, we should freeze the cache (via lock) to get a snapshot of current status.

Then parse the status to get which data should be cached.

And scan the disk (also during the freeze) to see which data indeed exists.

Finally compare the above two and print the diff in logs.

Implementation Tips

We could use Restful API to trigger the check. FYI, check be/src/http/action/file_cache_action.cpp for more details of Restful API support in Doris.

If you get in any trouble ...

Do not hesitate to contact me by WeChat 15811301868

Related issues

No response

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@freemandealer freemandealer added the kind/feature Categorizes issue or PR as related to a new feature. label Sep 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doris-future kind/feature Categorizes issue or PR as related to a new feature.
Projects
None yet
Development

No branches or pull requests

2 participants