Skip to content

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

Closed
brandon-bb wants to merge 2 commits intonanocurrency:developfrom
brandon-bb:clear
Closed

fixed bug in nano::rocksdb::store::clear()#4279
brandon-bb wants to merge 2 commits intonanocurrency:developfrom
brandon-bb:clear

Conversation

@brandon-bb
Copy link
Copy Markdown
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
Copy Markdown
Contributor

If you can rebase this I will merge it.

@RickiNano
Copy link
Copy Markdown
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