fix pendingDeletedLedgers do not remove ledger error#4525
Merged
StevenLuMT merged 2 commits intoFeb 14, 2025
Merged
Conversation
AnonHxy
reviewed
Nov 15, 2024
| log.debug("Persisting deletes of ledgers {}", deletedLedgers); | ||
| } | ||
|
|
||
| pendingDeletedLedgers.clear(); |
Contributor
There was a problem hiding this comment.
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.
TakaHiR07
force-pushed
the
fix_pendingDeletedLedgers_not_remove_ledger
branch
from
November 18, 2024 02:20
495513d to
2fc7cf0
Compare
AnonHxy
approved these changes
Nov 18, 2024
dlg99
approved these changes
Nov 18, 2024
hezhangjian
reviewed
Nov 19, 2024
hezhangjian
left a comment
Member
There was a problem hiding this comment.
is there any chance we can add unit test for this?
Contributor
Author
you can see the new code |
hezhangjian
approved these changes
Nov 19, 2024
Member
Checkstyle fail,please update @TakaHiR07
|
TakaHiR07
force-pushed
the
fix_pendingDeletedLedgers_not_remove_ledger
branch
from
February 14, 2025 02:11
43730af to
4614641
Compare
hezhangjian
approved these changes
Feb 14, 2025
Member
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

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.