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 getLedgerDirsListener #4015

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

gaozhangmin
Copy link
Contributor

@gaozhangmin gaozhangmin commented Jul 6, 2023

Motivation

The ledgerDirsListener in SingleDirectoryDbLedgerStorage is currently triggered by a ledger directory that does not belong to this storage.

Changes

To address this issue, we can introduce a comparison step to verify the ownership of the ledger directory before triggering the listeners. This way, the ledgerDirsListener will only be triggered for the directories that are associated with the storage.

@gaozhangmin
Copy link
Contributor Author

rerun failure checks

@gaozhangmin gaozhangmin closed this Jul 6, 2023
@gaozhangmin gaozhangmin reopened this Jul 6, 2023
@gaozhangmin
Copy link
Contributor Author

rerun failure checks

@gaozhangmin gaozhangmin closed this Jul 7, 2023
@gaozhangmin gaozhangmin reopened this Jul 7, 2023
Copy link
Contributor

@hangc0276 hangc0276 left a comment

Choose a reason for hiding this comment

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

Would you please add a test to cover the case you described?

gavingaozhangmin added 2 commits July 17, 2023 18:13
@gaozhangmin
Copy link
Contributor Author

@hangc0276 PTAL

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.

2 participants