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

cmd: fix memory leak when big dataset #2455

Merged
merged 2 commits into from
May 15, 2024

Conversation

fynnss
Copy link
Contributor

@fynnss fynnss commented May 14, 2024

Description

This pr fix memory leak when inspect trie with big dataset(more than 300M account and 100M contract)

Rationale

Bug fix for memory leak

Example

./geth db inspect-trie latest 5000 10

This command will inspect the latest state tree with a concurrency of 5000 trie, and finally print out the account tree and top 10 contract tree statistics.

Changes

Notable changes:

  • add topN for print top n storage trie
  • refactor for calc topN
  • fix memory leak

@fynnss fynnss force-pushed the fix_inspect_trie_memory_leak branch from 3f572c0 to 3d259e3 Compare May 14, 2024 03:43
@fynnss fynnss changed the title cmd: refactor inspect-trie and fix memory leak when big dataset cmd: fix memory leak when big dataset May 14, 2024
@fynnss fynnss changed the base branch from master to develop May 14, 2024 03:48
@fynnss fynnss force-pushed the fix_inspect_trie_memory_leak branch from 93bfdf6 to bb38b1f Compare May 14, 2024 06:38
Copy link

@RenRick RenRick left a comment

Choose a reason for hiding this comment

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

LGTM

@zzzckck zzzckck merged commit b230a02 into bnb-chain:develop May 15, 2024
7 checks passed
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