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

fixed bug in nano::rocksdb::store::clear() #4279

Closed
wants to merge 2 commits into from

Conversation

brandon-bb
Copy link
Contributor

@brandon-bb brandon-bb commented Sep 6, 2023

Addresses #3911 - issue before was that the function was deleting the column entirely to clear the contents then adding it back. This solution makes use of the atomic update feature in RocksDB by creating a batch of delete operations for all keys in the column and applying them with a write operation. This approach ensures that either all operations are applied or none are, thus guaranteeing database consistency.

@clemahieu
Copy link
Contributor

If you can rebase this I will merge it.

@RickiNano
Copy link
Contributor

I took the liberty of cherrypicking the commits to a new PR to resolve the merge conflict.
I hope this is ok. All credits go to @brandon-bb
New pr: #4304

@clemahieu clemahieu closed this Oct 1, 2023
@brandon-bb brandon-bb deleted the clear branch January 16, 2024 16:48
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