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

Database scan improvements #4734

Merged

Conversation

pwojcikdev
Copy link
Contributor

This uses iterators for fetching accounts for ascending bootstrap database scan. This significantly reduces the load on the database backend in case of RocksDB.

@gr0vity-dev
Copy link
Contributor

Both RocksDB test cases show significant improvement:

  • 5n4pr_rocks_10k_change is now passing again after consistent failures
    • It completed almost 2 minutes faster than average
  • 5n4pr_rocks_10k_bintree also improved, finishing 46 seconds quicker
Screenshot 2024-09-24 at 23 35 55

@qwahzi qwahzi added this to the V28 milestone Sep 25, 2024
clemahieu
clemahieu previously approved these changes Sep 28, 2024
Copy link
Contributor

@clemahieu clemahieu left a comment

Choose a reason for hiding this comment

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

LGTM

{
pending_iterator.next (transaction);
if (!(*pending_iterator).is_zero ())
// TODO: This pending iteration heuristic should be encapsulated in a pending_iterator class and reused across other components
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this heuristic used to skip accounts with a large number of pending entries? A comment on why using sequential scanning alone is insufficient would help.

@pwojcikdev pwojcikdev merged commit 9bffe3b into nanocurrency:develop Sep 30, 2024
26 of 28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Merged / V28.0
Development

Successfully merging this pull request may close these issues.

4 participants