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][misc]: ignore deleted ledger when tear down cluster #23831

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

Conversation

mattisonchao
Copy link
Member

Motivation

The current tear-down logic is listing ledgers and then deleting them. So, there's a race condition if some internal logic has deleted the schema ledger, which will cause the down process to fail.

Modifications

  • Ignore deleted ledgers while tear-down.

Verifying this change

  • Make sure that the change passes the CI checks.

Documentation

  • doc
  • doc-required
  • doc-not-needed
  • doc-complete

@mattisonchao mattisonchao self-assigned this Jan 9, 2025
@mattisonchao mattisonchao changed the title [fix][msic]: ignore deleted ledger when tear down cluster [fix][misc]: ignore deleted ledger when tear down cluster Jan 9, 2025
@github-actions github-actions bot added the doc-not-needed Your PR changes do not impact docs label Jan 9, 2025
switch (bkException.getCode()) {
case BKException.Code.NoSuchLedgerExistsException:
case BKException.Code.NoSuchLedgerExistsOnMetadataServerException:
case BKException.Code.NoSuchEntryException:
Copy link
Member

Choose a reason for hiding this comment

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

LGTM, but why to catch NoSuchEntryException ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/tool doc-not-needed Your PR changes do not impact docs ready-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants