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

Do not garbage collect blocks from fallback snapshots #117

Open
madadam opened this issue Apr 28, 2023 · 1 comment
Open

Do not garbage collect blocks from fallback snapshots #117

madadam opened this issue Apr 28, 2023 · 1 comment

Comments

@madadam
Copy link
Collaborator

madadam commented Apr 28, 2023

We currently preserve old snapshots if the new snapshot has locators that point to missing blocks but the old snapshot has at least some of the same locators pointing to present blocks. This is so that when opening a directory that has missing blocks in the current snapshot, we can try to fall back to the old snapshot so we can at least show the previous version of the directory. This feature is called "fallback".

Currently the garbage collector doesn't take this into account and in some cases can prematurely collect blocks that are needed for fallback.

Currently we do garbage collection and missing block detection in the same step and so enabling fallback for one would enable it for the other. This would be wrong because the missing block detection would not detect missing blocks from the latest snapshots because it would too fall back to the old snapshot.

One way to fix this would be to split them into two separate steps. Then do the missing blocks detection without fallback and garbage collection with it.

@madadam
Copy link
Collaborator Author

madadam commented Jun 7, 2023

The scan job has been split in 88dd396 but the garbage collect job still doesn't use fallback because enabling it caused some tests to fail. It needs more investigation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant