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

sstables: delete_with_pending_deletion_log: batch sync_directory #14967

Conversation

bhalevy
Copy link
Member

@bhalevy bhalevy commented Aug 6, 2023

When deleting multiple sstables with the same prefix the deletion atomicity is ensured by the pending_delete_log file, so if scylla crashes in the middle, deletions will be replyed on restart.

Therefore, we don't have to ensure atomicity of each individual unlink. We just need to sync the directory once, before removing the pending_delete_log file.

When deleting multiple sstables with the same prefix
the deletion atomicity is ensured by the pending_delete_log file,
so if scylla crashes in the middle, deletions will be replyed on
restart.

Therefore, we don't have to ensure atomicity of each individual
`unlink`.  We just need to sync the directory once, before
removing the pending_delete_log file.

Signed-off-by: Benny Halevy <bhalevy@scylladb.com>
@bhalevy bhalevy requested review from xemul and removed request for nyh August 6, 2023 07:29
@github-actions github-actions bot deleted a comment from aws-amplify-us-east-2 bot Aug 6, 2023
@scylladb-promoter
Copy link
Contributor

@avikivity
Copy link
Member

I think we would have ended up with nicer code if we changed the interface to delete multiple sstables. But it's not worth the effort to refactor.

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

Successfully merging this pull request may close these issues.

None yet

3 participants