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

feat: system function to detect&remove orphaned blocks of a database #7970

Open
Tracked by #7823
BohuTANG opened this issue Sep 29, 2022 · 2 comments
Open
Tracked by #7823

feat: system function to detect&remove orphaned blocks of a database #7970

BohuTANG opened this issue Sep 29, 2022 · 2 comments
Labels
C-feature Category: feature stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed

Comments

@BohuTANG
Copy link
Member

BohuTANG commented Sep 29, 2022

Summary

Scan

List all the object dir of a database prefix:

call fuse_data_scan(`<db-name>`);

This function will do the following:

  1. list all the dirs of the database prefix
  2. return the 'table' dir status(orphaned/attached) and size

Clean

Remove the orphaned(a prefix not related to a table that is in the metasrv) table dir:

call fuse_data_clean(`<db-name>`);
  1. list all the dirs of the database prefix with status
  2. remove orphaned status dir and all the files
@BohuTANG BohuTANG added the C-feature Category: feature label Sep 29, 2022
@BohuTANG
Copy link
Member Author

Welcome to comments, cc @dantengsky

@dantengsky
Copy link
Member

dantengsky commented Sep 30, 2022

list all the dirs of the database prefix with status

let's implement this based on the list API first.

and refine the implementation by using undo logs later. but the impl based on list API should be kept, as the last resort (one tool of the doomsday toolkit)

@dosubot dosubot bot added the stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed label Sep 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-feature Category: feature stale Issue has not had recent activity or appears to be solved. Stale issues will be automatically closed
Projects
None yet
Development

No branches or pull requests

2 participants