-
Notifications
You must be signed in to change notification settings - Fork 107
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
change(state): Stop using iterators on column families with many deletions #7663
Conversation
Co-authored-by: Arya <[email protected]>
Manual TestingI did a local test of this fix on my machine, and Zebra is up to 1.2 million blocks in under 5 hours. This is faster than Marek's I think But I'd appreciate someone else checking the performance as well. A manual check is ok, we can do detailed checks in #7649. |
This PR is as fast as I wonder if we could speed Zebra up even further by fixing a similar issue that degrades performance elsewhere, but we accepted it. |
In the merge queue, the test passed but the job failed:
|
@Mergifyio refresh |
✅ Pull request refreshed |
I reopened PR #7564 for this. Since this PR is failing due to bug #7665, I'm going to admin-merge it. |
Motivation
When we use a RocksDB iterator on a column family with lots of deleted keys, database performance decreases by up to 300x.
Closes #7618
Specifications
This is a known issue with RocksDB, here are similar issues in other projects:
https://tracker.ceph.com/issues/55324
https://jira.mariadb.org/browse/MDEV-19670
Solution
As a quick fix we can replace the iterator with
get(&key)
.The permanent fix in PR #7392 stops deleting these keys entirely.
Manual Testing
I did a local test of this fix, and Zebra is up to 1.2 million blocks in under 5 hours. This is faster than Marek's
main
branch checks on his machine, and about as fast asv1.2.0
in CI:https://github.com/ZcashFoundation/zebra/actions/runs/6049184682/job/16453440408
I think
v1.2.0
was about as fast on my machine, but I haven't done any detailed tests. (A manual check is ok, we can do detailed checks in #7649.)Review
This is an urgent fix which is blocking CI from working.
Reviewer Checklist
Follow Up Work
Permanent fixes for all column families that delete keys:
Performance testing for this fix: