Skip to content

fix pendingDeletedLedgers do not remove ledger error#4525

Merged
StevenLuMT merged 2 commits into
apache:masterfrom
TakaHiR07:fix_pendingDeletedLedgers_not_remove_ledger
Feb 14, 2025
Merged

fix pendingDeletedLedgers do not remove ledger error#4525
StevenLuMT merged 2 commits into
apache:masterfrom
TakaHiR07:fix_pendingDeletedLedgers_not_remove_ledger

Conversation

@TakaHiR07

@TakaHiR07 TakaHiR07 commented Nov 15, 2024

Copy link
Copy Markdown
Contributor

Motivation

fix this pr #3989 cause ledger not remove in pendingDeletedLedgers.

Previous would do poll(), but later just do forEach()

Changes

keep the same logic before pr-3989.

Alternative fix is revert previous pr.

log.debug("Persisting deletes of ledgers {}", deletedLedgers);
}

pendingDeletedLedgers.clear();

@AnonHxy AnonHxy Nov 15, 2024

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks for your fix. But I think we should call pendingDeletedLedgers.remove(ledgerId) after line342.
pendingDeletedLedgers cloud being adding when call clear(), cause some ledgers not have deleted from ledgersDB but clear from pendingDeletedLedgers .

By the way. pendingDeletedLedgers is a Sets.newConcurrentHashSet(). I think it will not concurrent error.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

that's ok

@TakaHiR07
TakaHiR07 force-pushed the fix_pendingDeletedLedgers_not_remove_ledger branch from 495513d to 2fc7cf0 Compare November 18, 2024 02:20

@hezhangjian hezhangjian left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

is there any chance we can add unit test for this?

@TakaHiR07

Copy link
Copy Markdown
Contributor Author

is there any chance we can add unit test for this?

you can see the new code

@StevenLuMT StevenLuMT left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Good jobs

@StevenLuMT

Copy link
Copy Markdown
Member
image Checkstyle fail,please update @TakaHiR07

@TakaHiR07
TakaHiR07 force-pushed the fix_pendingDeletedLedgers_not_remove_ledger branch from 43730af to 4614641 Compare February 14, 2025 02:11
@StevenLuMT

Copy link
Copy Markdown
Member

@zymap

StevenLuMT pushed a commit to StevenLuMT/bookkeeper that referenced this pull request Jun 11, 2025
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
StevenLuMT pushed a commit to StevenLuMT/bookkeeper that referenced this pull request Jun 11, 2025
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
StevenLuMT pushed a commit that referenced this pull request Jun 12, 2025
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
StevenLuMT pushed a commit that referenced this pull request Jun 12, 2025
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
priyanshu-ctds pushed a commit to datastax/bookkeeper that referenced this pull request Jul 11, 2025
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
(cherry picked from commit a940bf3)
sandeep-ctds pushed a commit to datastax/bookkeeper that referenced this pull request Jul 22, 2025
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
(cherry picked from commit a940bf3)
manas-ctds pushed a commit to datastax/bookkeeper that referenced this pull request Feb 27, 2026
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
(cherry picked from commit 0d31202)
dlg99 pushed a commit to datastax/bookkeeper that referenced this pull request Feb 27, 2026
* fix pendingDeletedLedgers not remove ledger

(cherry picked from commit 0df3caf)
(cherry picked from commit 0d31202)
@hangc0276 hangc0276 added this to the 4.18.0 milestone May 27, 2026
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.

6 participants