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

db: have Checkpoint support shared/external files #3362

Closed
itsbilal opened this issue Feb 29, 2024 · 0 comments · Fixed by #3415
Closed

db: have Checkpoint support shared/external files #3362

itsbilal opened this issue Feb 29, 2024 · 0 comments · Fixed by #3415
Assignees
Labels

Comments

@itsbilal
Copy link
Member

Currently, we don't copy over or link shared/external files when Checkpoint is called. This is broadly desirable as Checkpoint is supposed to be a quick operation that is often called as part of a crash-worthy event (eg. replica corruption), and copying over gigabites of sstables from remote storage before crashing sounds undesirable.

As part of this change, we should ensure Pebble also copies over the objprovider Catalog so any references to external/shared files are copied over. Furthermore, we should ensure that we leave any references on shared files dangling after a Checkpoint so those files don't get deleted by other nodes.

@itsbilal itsbilal added C-enhancement New feature or request T-storage labels Feb 29, 2024
@itsbilal itsbilal self-assigned this Mar 5, 2024
itsbilal added a commit to itsbilal/pebble that referenced this issue Mar 15, 2024
Previously, if we couldn't read a remote file's DiskFileNum locally,
we'd error out on the Checkpoint() function even though the store
was valid and the file just happened to be remote (shared or external).
This change adds support for saving the catalog's state to the checkpoint
directory so references to remote files from the checkpoint can still
be resolved. To prevent unreffing of shared files, we need to add a dangling
reference to them that doesn't get deleted.

Fixes cockroachdb#3362.
itsbilal added a commit to itsbilal/pebble that referenced this issue Mar 18, 2024
Previously, if we couldn't read a remote file's DiskFileNum locally,
we'd error out on the Checkpoint() function even though the store
was valid and the file just happened to be remote (shared or external).
This change adds support for saving the catalog's state to the checkpoint
directory so references to remote files from the checkpoint can still
be resolved. To prevent unreffing of shared files, we need to add a dangling
reference to them that doesn't get deleted.

Fixes cockroachdb#3362.
itsbilal added a commit to itsbilal/pebble that referenced this issue Mar 18, 2024
Previously, if we couldn't read a remote file's DiskFileNum locally,
we'd error out on the Checkpoint() function even though the store
was valid and the file just happened to be remote (shared or external).
This change adds support for saving the catalog's state to the checkpoint
directory so references to remote files from the checkpoint can still
be resolved. To prevent unreffing of shared files, we need to add a dangling
reference to them that doesn't get deleted.

Fixes cockroachdb#3362.
itsbilal added a commit that referenced this issue Mar 18, 2024
Previously, if we couldn't read a remote file's DiskFileNum locally,
we'd error out on the Checkpoint() function even though the store
was valid and the file just happened to be remote (shared or external).
This change adds support for saving the catalog's state to the checkpoint
directory so references to remote files from the checkpoint can still
be resolved. To prevent unreffing of shared files, we need to add a dangling
reference to them that doesn't get deleted.

Fixes #3362.
@jbowens jbowens moved this to Done in [Deprecated] Storage Jun 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

1 participant