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: raw iter data wipe #265

Merged
merged 4 commits into from
Jul 21, 2023
Merged

feat: raw iter data wipe #265

merged 4 commits into from
Jul 21, 2023

Conversation

iammadab
Copy link
Contributor

Clear GroveDB data by deleting each key value pair in the rocksdb column families.
This is not efficient and should be revised, a constant time solution is desired.

Issue being fixed or feature implemented

What was done?

How Has This Been Tested?

Breaking Changes

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added or updated relevant unit/integration/functional/e2e tests
  • I have made corresponding changes to the documentation

For repository code-owners and collaborators only

  • I have assigned this pull request to a milestone

@iammadab iammadab merged commit cc1b577 into develop Jul 21, 2023
@iammadab iammadab deleted the raw-iter-wipe branch July 21, 2023 10:07
let mut iter = self.db.raw_iterator_cf(&cf_handle);
iter.seek_to_first();
while iter.valid() {
self.db.delete(iter.key().expect("should have key"));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Clippy warning

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.

3 participants