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

Add a DropAll method in ManagedDB #525

Merged
merged 6 commits into from Jul 12, 2018
Merged

Add a DropAll method in ManagedDB #525

merged 6 commits into from Jul 12, 2018

Conversation

manishrjain
Copy link
Contributor

@manishrjain manishrjain commented Jul 12, 2018

This method drops all tables from the LSM tree, except one to maintain the persistence of badgerHead key. This is important to avoid value log being replayed from scratch.

It then iterates over the rest of the keys and marks them as deleted. The end result should be that all keys are considered deleted.

NOTE to users: The timestamp used for writes must be greater than the max timestamp of writes before DropAll, to ensure that new writes are not lower than the delete markers in terms of versioning.


This change is Reviewable

@manishrjain manishrjain merged commit e018438 into master Jul 12, 2018
@manishrjain manishrjain deleted the mrjn/dropall branch July 12, 2018 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant