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 ReadOnlyLedgerHandle leak issue when checkAllLedgers. #4468

Merged
merged 1 commit into from
Jul 31, 2024

Conversation

horizonzy
Copy link
Member

When the Auditor checkAllledgers, it will open the ledger with NoRecovery mode, it will register the listeners to the AbstractZkLedgerManager#listeners.

The listener won't be removed if we don't close the ReadOnlyLedgerHandle, so there will be lots of listeners in the heap memory.

The heap dump:

image

@hangc0276 hangc0276 merged commit 999cd0f into apache:master Jul 31, 2024
23 checks passed
hangc0276 pushed a commit that referenced this pull request Aug 5, 2024
When the Auditor checkAllledgers, it will open the ledger with NoRecovery mode, it will register the listeners to the AbstractZkLedgerManager#listeners.

The listener won't be removed if we don't close the ReadOnlyLedgerHandle, so there will be lots of listeners in the heap memory.

The heap dump:

<img width="1572" alt="image" src="https://github.com/user-attachments/assets/8b4cd6d3-b7bf-4ef2-9c47-2e076bdbbba0">

(cherry picked from commit 999cd0f)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants