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

Fix: check diff before commiting it to storage #92

Merged
merged 2 commits into from
Aug 28, 2023

Conversation

birchmd
Copy link
Member

@birchmd birchmd commented Aug 25, 2023

This fix address the performance issue in the refiner where constantly writing and deleting the same key made reading that key slow. Now the diff of a transaction is checked before committing it to the DB so that only the correct diff is written. Related PR: aurora-is-near/aurora-engine#825

@birchmd birchmd added the bug Something isn't working label Aug 25, 2023
&tx_outcome.info,
&tx_outcome.diff,
)?
tx_outcome.commit(storage)?
Copy link
Member

Choose a reason for hiding this comment

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

Would it be better to add in the future a method to the Storage that will accept an array of txs and persist the changes atomically via WriteBatch?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, good point that would be better. I created an issue for it here so that the idea doesn't get lost.

@birchmd birchmd merged commit 5c92fae into main Aug 28, 2023
6 checks passed
@birchmd birchmd deleted the fix/birchmd/check-diff-before-commit branch August 28, 2023 13:43
aleksuss pushed a commit that referenced this pull request Aug 30, 2023
aleksuss pushed a commit that referenced this pull request Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants