GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — [fix] Failed read entries after multiple decommissioning by poorbarcode · Pull Request #4613 · apache/bookkeeper

Conversation

@poorbarcode

@poorbarcode poorbarcode commented Jun 5, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Motivation

Background

  • ReadOnlyLedgerHandle opened without doRecovery, in other words, it has not been closed yet, its metadata in memory will be updated once modified.
  • ReadOnlyLedgerHandle opened with doRecovery, in other words, it has been closed or it will be closed; its metadata in memory will never be updated

Issue

  • Background: The ledger's metadata can also be modified by the auto-recovery component.
  • There is a scenario in which a ledger handle always gets the error org.apache.bookkeeper.client.BKException$BKBookieHandleNotAvailableException: Bookie handle is not available` after multiple decommissions. The reproduction steps are as follows
    • Client service opens a read-only ledger handle, which has been closed.
    • All BKs that relate to the ledger have been decommissioned.
    • Auto recovery component moved the data into other BK instances who is alive.
    • The ledger handle in the client memory keeps connecting to the BKs who are in the original ensemble set, and the connection will always fail.
  • You can reproduce the issue with the new test testOpenedLedgerHandleStillWorkAfterDecommissioning

Changes

Let Bookie LedgerHandle always accept the metadata updates, no matter "doRecovery" or not.

Provide a new API to open a read-only ledger handle with keepUpdateMetadata, the ledger's metadata in memory will be updated automatically after the auto-recovery component updates it.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@codelipenghui

codelipenghui commented Jun 5, 2025

Copy link
Copy Markdown
Contributor

I'm curious about is there any cases that the ReadOnlyLedgerHandle cannot accept the updates from metadata server. As I understand, it should always accept the metadata updates no matter "doRecovery" or not. If the Ledger metadata updates to the Ledger which need to be recovered is not expected, we should fix the updates parts.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode

poorbarcode commented Jun 6, 2025

Copy link
Copy Markdown
Contributor Author

@codelipenghui

I'm curious about is there any cases that the ReadOnlyLedgerHandle cannot accept the updates from metadata server. As I understand, it should always accept the metadata updates no matter "doRecovery" or not.

Changed the implementation.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode poorbarcode closed this Jun 6, 2025
@poorbarcode poorbarcode reopened this Jun 6, 2025
zymap
zymap reviewed Jun 11, 2025
View reviewed changes
Comment thread bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode
poorbarcode requested a review from zymap June 11, 2025 02:52
zymap
zymap reviewed Jul 10, 2025
View reviewed changes
Comment thread bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode
poorbarcode requested a review from zymap July 10, 2025 06:40
@zymap
zymap requested a review from hangc0276 July 18, 2025 02:21
@zymap zymap assigned poorbarcode Jul 18, 2025
zymap
zymap approved these changes Jul 18, 2025
View reviewed changes
@zymap zymap added the release/4.17.3 label Jul 18, 2025
@zymap zymap added this to the 4.18.0 milestone Jul 18, 2025
@zymap zymap added the type/improvement label Jul 18, 2025
@poorbarcode
poorbarcode force-pushed the fix/ledger_handle_inavaliable branch from aeb118b to abb7ec5 Compare July 30, 2025 09:15
@StevenLuMT

StevenLuMT commented Aug 6, 2025

Copy link
Copy Markdown
Member

rerun failure checks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode poorbarcode closed this Aug 6, 2025
@poorbarcode poorbarcode reopened this Aug 6, 2025
StevenLuMT
StevenLuMT approved these changes Aug 10, 2025
View reviewed changes

@StevenLuMT StevenLuMT left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Good jobs

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@lhotari lhotari mentioned this pull request Aug 27, 2025
[fix][broker] Fix topic compaction is failed after compactedLedger's all quorum is being recover apache/pulsar#21552
Closed
1 of 14 tasks
hangc0276
hangc0276 reviewed Sep 2, 2025
View reviewed changes
Comment thread bookkeeper-server/src/main/java/org/apache/bookkeeper/client/LedgerOpenOp.java Resolved

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode
poorbarcode force-pushed the fix/ledger_handle_inavaliable branch from 5b5294a to fd48774 Compare September 9, 2025 09:18
@poorbarcode poorbarcode closed this Sep 10, 2025
@poorbarcode poorbarcode reopened this Sep 10, 2025
@poorbarcode
poorbarcode requested a review from hangc0276 September 11, 2025 04:01
@poorbarcode poorbarcode closed this Sep 11, 2025
@poorbarcode poorbarcode reopened this Sep 11, 2025
@poorbarcode poorbarcode closed this Sep 11, 2025
@poorbarcode poorbarcode reopened this Sep 11, 2025
@poorbarcode poorbarcode closed this Sep 14, 2025
poorbarcode added 3 commits October 23, 2025 11:07
@poorbarcode
remove logs for CI
229889e
@poorbarcode
address comment
dcc1861
@poorbarcode
fix test
b1b453c
@poorbarcode
poorbarcode force-pushed the fix/ledger_handle_inavaliable branch from e125401 to b1b453c Compare October 23, 2025 03:08
@poorbarcode poorbarcode closed this Oct 27, 2025
@poorbarcode poorbarcode reopened this Oct 27, 2025
@poorbarcode

poorbarcode commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

rerun failure checks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode poorbarcode closed this Oct 27, 2025
@poorbarcode poorbarcode reopened this Oct 27, 2025
@poorbarcode

poorbarcode commented Oct 27, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

rerun failure checks

https://github.com/apache/bookkeeper/actions/runs/18828128247/job/53714715505?pr=4672

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode poorbarcode closed this Oct 27, 2025
@poorbarcode poorbarcode reopened this Oct 27, 2025
@poorbarcode poorbarcode closed this Oct 27, 2025
@poorbarcode poorbarcode reopened this Oct 27, 2025
@poorbarcode poorbarcode closed this Oct 27, 2025
@poorbarcode poorbarcode reopened this Oct 27, 2025
@poorbarcode

poorbarcode commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

rerun failure checks

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@poorbarcode poorbarcode closed this Oct 27, 2025
@poorbarcode poorbarcode reopened this Oct 27, 2025
@poorbarcode poorbarcode closed this Oct 27, 2025
@poorbarcode poorbarcode reopened this Oct 27, 2025
@zymap
zymap merged commit bae9e49 into apache:master Oct 29, 2025
lhotari pushed a commit that referenced this pull request Nov 28, 2025
@poorbarcode @lhotari
[fix] Failed read entries after multiple decommissioning (#4613)
b6d8b0f
* -

* checkstyle

* let all ledger handle enable watcher

* let all ledger handle enable watcher

* fix tests

* fix tests

* fix tests

* add test logs for debug

* add test logs for debug

* add test logs for debug

* -

* add a new param keepUpdateMetadata when open a read-only ledger handle

* address comments

* address comment

* address comment

* test CI

* test CI

* test CI

* test CI

* test CI

* test CI

* test CI

* remove logs for CI

* test CI

* remove logs for CI

* address comment

* fix test

(cherry picked from commit bae9e49)
@lhotari lhotari added the cherry-picked/branch-4.17 label Nov 28, 2025
priyanshu-ctds pushed a commit to datastax-archive/datastax--bookkeeper that referenced this pull request Dec 2, 2025
@poorbarcode @priyanshu-ctds
[fix] Failed read entries after multiple decommissioning (apache#4613)
3faaeee
* -

* checkstyle

* let all ledger handle enable watcher

* let all ledger handle enable watcher

* fix tests

* fix tests

* fix tests

* add test logs for debug

* add test logs for debug

* add test logs for debug

* -

* add a new param keepUpdateMetadata when open a read-only ledger handle

* address comments

* address comment

* address comment

* test CI

* test CI

* test CI

* test CI

* test CI

* test CI

* test CI

* remove logs for CI

* test CI

* remove logs for CI

* address comment

* fix test

(cherry picked from commit bae9e49)
(cherry picked from commit b6d8b0f)
srinath-ctds pushed a commit to datastax-archive/datastax--bookkeeper that referenced this pull request Dec 4, 2025
@poorbarcode @srinath-ctds
[fix] Failed read entries after multiple decommissioning (apache#4613)
d359715
* -

* checkstyle

* let all ledger handle enable watcher

* let all ledger handle enable watcher

* fix tests

* fix tests

* fix tests

* add test logs for debug

* add test logs for debug

* add test logs for debug

* -

* add a new param keepUpdateMetadata when open a read-only ledger handle

* address comments

* address comment

* address comment

* test CI

* test CI

* test CI

* test CI

* test CI

* test CI

* test CI

* remove logs for CI

* test CI

* remove logs for CI

* address comment

* fix test

(cherry picked from commit bae9e49)
(cherry picked from commit b6d8b0f)
@poorbarcode poorbarcode mentioned this pull request Feb 2, 2026
[fix][broker]Fix ledgerHandle failed to read by using new BK API apache/pulsar#25199
Merged
1 of 4 tasks
@programmerahul programmerahul mentioned this pull request Jul 27, 2026
[Bug] Pulsar LedgerHandle contains incorrect ensemble leading to producer creation failure apache/pulsar#24265
Open
2 of 3 tasks
@void-ptr974 void-ptr974 mentioned this pull request Oct 3, 2026
[Bug] Broker memory leak caused by unclosed BookKeeper read handles apache/pulsar#26815
Open
3 tasks done
@KannarFr KannarFr mentioned this pull request Oct 28, 2026
[fix][ml] Retry a failed read on the bookies a cached read handle's ledger was re-replicated to apache/pulsar#27147
Merged
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@zymap zymap zymap approved these changes
@StevenLuMT StevenLuMT StevenLuMT approved these changes
@hangc0276 hangc0276 Awaiting requested review from hangc0276

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@poorbarcode poorbarcode

Labels

cherry-picked/branch-4.17 release/4.17.3 type/improvement

Projects

None yet

Milestone

4.18.0

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@poorbarcode @codelipenghui @StevenLuMT @hangc0276 @zymap @lhotari
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.