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][ml] Fix cached read handle leaks when closing read-only managed ledgers by void-ptr974 · Pull Request #26816 · apache/pulsar

Conversation

@void-ptr974

@void-ptr974 void-ptr974 commented Oct 2, 2026 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Contributor

Transaction buffer snapshot recovery closes the temporary read-only managed ledger it opens. Each independent reader owns its read state for its lifetime. A same-name writable ledger can therefore retry storage reads after that reader closes.

Main Issue: #26815

Motivation

Snapshot recovery opens a read-only managed ledger to read indexed snapshot segments. The factory wrapper previously gave the caller no way to close it, leaving its cached read handles open.

The factory keys its writable-ledger and entry-cache registries by managed-ledger name. When it removes the matching writable ledger, it removes that name's entry cache in the same operation. A read-only open creates a separate, caller-owned instance outside the writable-ledger registry. It could still create the shared entry cache first, which bound storage retries to that instance. If the reader closed after a same-name writer acquired the cache, an expired offload handle could cause the writer to retry through the closed reader.

Modifications

  • Close the ledger where recovery owns it. Add a backward-compatible default ReadOnlyManagedLedger.asyncClose() and delegate through the factory wrapper. Recovery starts close in finally and closes a successful open that arrives after a timeout or interruption. Cursors created from a read-only ledger borrow it from the caller who owns it.
  • Give each independently opened reader its own entry-cache state. With factory entry caching enabled, the reader gets a private RangeEntryCacheImpl when it opens. It tracks in-flight reads outside the name registry and leaves entry payloads uncached. It uses the reader's handle-retry operations, the existing factory read limiter, and the reader's cache-miss metrics. Point reads follow the independent read-only position rules ([fix][ml] Read published positions through stale read-only caches #27223). A factory cache size of zero selects EntryCacheDisabled.
  • Clear private read state and release storage handles. The close flag rejects handle lookups that race with close. Close clears the private entryCache's pending-read index, and the parent drains ledgerCache, which holds this instance's storage handles. Previously issued reads can complete through their callbacks, and the parent releases handles whose opens finish after the drain, even after the close future completes ([fix][ml] Retry a failed read on the bookies a cached read handle's ledger was re-replicated to #27147).

Snapshot recovery performs point reads whose storage results are uncached by default. The private path gives up shared entry hits, cross-instance read coalescing, and read-ahead for independently opened read-only ledgers.

Verifying this change

  • Make sure that the change passes the CI checks.

Local testing at 522f93cd50a with upstream master 893259f491d passed 145 managed-ledger tests and 3 broker tests with test retries disabled.

  • The public offload regression covers both a read-only retry and a writable retry after the read-only ledger closes. On the preceding local baseline, temporarily restoring name-based registration for the read-only cache reproduced ManagedLedgerAlreadyClosedException.
  • Other cases cover factory close, an insertion racing with the handle-cache drain, private pending-read cleanup, BookKeeper rollover and re-replication, cursor metadata, and a snapshot ledger open that completes after timeout.
  • Managed-ledger test Checkstyle and both modules' Spotless checks passed. An earlier full quickCheck run encountered existing SummaryJavadoc errors. The baseline and candidate had the same 89 managed-ledger main Checkstyle findings.

Does this pull request potentially affect one of the following parts:

  • Dependencies (add or upgrade a dependency)
  • The public API
  • The schema
  • The default values of configurations
  • The threading model
  • The binary protocol
  • The REST endpoints
  • The admin CLI options
  • The metrics
  • Anything that affects deployment

Sorry, something went wrong.

Uh oh!

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

All reactions
@void-ptr974
[fix][ml] Close cached handles when a read-only managed ledger closes
ddf2c61
Release the read-only handle cache on close, including fenced closes and handles whose opens are pending, without changing writable managed-ledger shutdown.

Main Issue: apache#26815

Assisted-by: OpenAI Codex
@void-ptr974 void-ptr974 changed the title [fix][ml] Close cached handles when a read-only managed ledger closes [fix][ml] Fix cached read handle leaks when closing read-only managed ledgers Oct 2, 2026
@void-ptr974
Reject read handle opens after read-only managed ledger close
00993bc
Guard cache insertion against concurrent close and cover reads after normal or fenced close, repeated close, and independent cleanup failures.

Assisted-by: OpenAI Codex
@void-ptr974 void-ptr974 mentioned this pull request Oct 2, 2026
[fix][ml] Fix metadata listener leaks caused by unclosed temporary read handles #26817
Merged
11 tasks
@void-ptr974
void-ptr974 marked this pull request as ready for review October 2, 2026 15:58
@void-ptr974 void-ptr974 mentioned this pull request Oct 9, 2026
[Bug] Broker memory leak caused by unclosed BookKeeper read handles #26815
Open
3 tasks done
Denovo1998
Denovo1998 requested changes Oct 9, 2026
View reviewed changes
Comment thread managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ReadOnlyManagedLedgerImpl.java Resolved

Uh oh!

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

Comment thread ...r/src/test/java/org/apache/bookkeeper/mledger/impl/ReadOnlyManagedLedgerHandleCloseTest.java Resolved

Uh oh!

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

lhotari
lhotari requested changes Oct 13, 2026
View reviewed changes

@lhotari lhotari 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.

Thanks for tracking down this leak and for the thorough tests of the close path.

The close logic in ReadOnlyManagedLedgerImpl looks right to me. The flag is set before the cache is drained. The recheck after insertion covers the late-open race. Invalidation is async, so nothing blocks. A second close finds an empty cache and does nothing.

My main concern is the one @Denovo1998 raised: nothing in production calls the new asyncClose. ManagedLedgerFactoryImpl.asyncOpenReadOnlyManagedLedger returns ReadOnlyManagedLedgerImplWrapper. Neither the wrapper nor the ReadOnlyManagedLedger interface has a close method. ReadOnlyCursorImpl.asyncClose only closes the cursor. Factory shutdown does not help either, because read-only ledgers are never added to its ledgers map. SnapshotSegmentAbortedTxnProcessorImpl.readSegmentEntries is the only production caller, and it drops the ledger without closing it. The new tests build ReadOnlyManagedLedgerImpl directly, so they cannot show this. As it stands, the leak in the description still happens. Please add a close path to the interface and wrapper, call it from that caller, and add a test through the factory API. If you want to keep this PR as groundwork only, please say so in the description.

I also agree with the second open thread. No test reaches the recheck in getLedgerHandle. Deleting it leaves every test green. A deterministic option is to call readOnly.close() from inside the stubbed newOpenLedgerOp() execution, before super.getLedgerHandle returns. Then assert the returned future fails with ManagedLedgerAlreadyClosedException and the handle gets closed. Separately, testCloseReleasesHandleWhoseOpenIsPending assumes initialize() opens exactly one handle (openedHandles.size() == 2, get(1)). Recording the size before the call would be less brittle, especially next to #26817, which also touches ReadOnlyManagedLedgerImpl.

Sorry, something went wrong.

Uh oh!

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

All reactions
@lhotari lhotari mentioned this pull request Oct 14, 2026
[fix][ml] Close cached read handles when read-only managed ledger shuts down #26918
Closed
@Asthenia0412 Asthenia0412 mentioned this pull request Oct 16, 2026
[fix][ml] Add ReadOnlyManagedLedger asyncClose interface + production call path #26934
Closed
@void-ptr974
[fix][ml] Wire read-only ledger close through callers
401ff9c
Expose an asynchronous close on the factory-facing read-only ledger API, delegate it through the wrapper, and close snapshot recovery ledgers after use.

Add deterministic coverage for the close/open race, factory delegation, and the broker caller lifecycle.

Assisted-by: OpenAI Codex
@void-ptr974

void-ptr974 commented Oct 17, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @Denovo1998 and @lhotari for the detailed reviews. I've pushed 401ff9c67fd to address the outstanding feedback:

  • added a backward-compatible ReadOnlyManagedLedger.asyncClose() and wrapper delegation;
  • closed the factory-created ledger from snapshot-segment recovery on every exit path;
  • added factory-facing and production-caller lifecycle coverage;
  • added deterministic coverage for the concurrent close/open path;
  • removed the test's fixed initialization-handle-count assumption; and
  • avoided holding the managed-ledger monitor while initiating read-handle cleanup.

The focused managed-ledger and broker tests pass locally, as does quickCheck. I also mutation-checked the three new paths: removing the post-open recheck, wrapper delegation, or caller close makes the corresponding test fail.

Could you please take another look when convenient?

All reactions

Sorry, something went wrong.

Uh oh!

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

Denovo1998
Denovo1998 approved these changes Oct 17, 2026
View reviewed changes
@Denovo1998 Denovo1998 mentioned this pull request Oct 18, 2026
[fix][ml] Fix read handle invalidation for read-only managed ledgers Denovo1998/pulsar#50
Open
1 of 11 tasks
codelipenghui
codelipenghui approved these changes Oct 21, 2026
View reviewed changes

@codelipenghui codelipenghui left a comment

Copy link
Copy Markdown
Contributor

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.

Reviewed head 401ff9c. No actionable findings identified within the reviewed scope.

Focused validation passed: 18 managed-ledger tests and 1 snapshot-recovery lifecycle test. The scoped cleanup and factory/caller close wiring look sound.

Sorry, something went wrong.

Uh oh!

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

All reactions
void-ptr974 added 4 commits October 25, 2026 13:43
@void-ptr974
Merge master into PR apache#26816
45436ce
Preserve the expectedReadCount read overload alongside read-only ledger handle cleanup, and add a regression for count propagation.

Assisted-by: Codex
@void-ptr974
[fix][ml] Unify read resource ownership across ledger lifecycles
3813e5d
Register handle promises before IO, invalidate failed handles by identity, and release cached and temporary resources across close, initialization, and executor failures. Track read-only opens through shutdown, give factory cursors ownership, and dispose isolated entry caches and unreturned entries.

Assisted-by: Codex
@void-ptr974
[fix][broker] Release snapshot resources after abandoned waits
c3598b5
Release late read-only ledgers and entries after a snapshot recovery wait times out or is interrupted. Preserve the recovery result when cleanup fails, and cover delayed resources and close failures.

Assisted-by: Codex
@void-ptr974
[fix][ml] Unregister shadow source watches when close starts
67e1023
Detach the source watcher immediately after the close gate is claimed, independently of pending BookKeeper or cursor close callbacks. Run the cleanup without holding the managed-ledger monitor and cover a delayed current-handle close.

Assisted-by: Codex
@void-ptr974 void-ptr974 changed the title [fix][ml] Fix cached read handle leaks when closing read-only managed ledgers [fix][ml] Fix read resource leaks across managed ledger lifecycles Oct 25, 2026
@void-ptr974
[fix][ml] Keep read-only handle cleanup focused
f31fa58
Revert the lifecycle expansion in 3813e5d, c3598b5, and 67e1023. Restore the six-file read-only handle cleanup and master conflict resolution from 45436ce.

Keep the broader lifecycle, factory, cache, Shadow, and abandoned-wait changes on the backup branch for separate work.

Assisted-by: Codex
@void-ptr974 void-ptr974 changed the title [fix][ml] Fix read resource leaks across managed ledger lifecycles [fix][ml] Fix cached read handle leaks when closing read-only managed ledgers Oct 25, 2026
codelipenghui
codelipenghui approved these changes Oct 26, 2026
View reviewed changes

@codelipenghui codelipenghui left a comment

Copy link
Copy Markdown
Contributor

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.

Reviewed head f31fa58. No actionable findings identified within the reviewed scope.

The merge preserves expectedReadCount forwarding and the previously reviewed cleanup behavior. All 23 focused tests passed. The new regression test also failed when forwarding was deliberately removed and passed after restoration.

Sorry, something went wrong.

Uh oh!

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

All reactions
@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 #27147
Merged
11 tasks
This was referenced Oct 28, 2026
[fix][txn] Release late entries after snapshot recovery stops waiting Denovo1998/pulsar#64
Open
[fix][txn] Release late entries after snapshot recovery stops waiting #27207
Merged
lhotari
lhotari approved these changes Nov 18, 2026
View reviewed changes

@lhotari lhotari 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.

LGTM. Thanks for working through the earlier points; each one is addressed.

ReadOnlyManagedLedger.asyncClose() now exists with a no-op default, ReadOnlyManagedLedgerImplWrapper.asyncClose() delegates to the implementation, and SnapshotSegmentAbortedTxnProcessorImpl.readSegmentEntries closes the ledger in a finally, so the production path now releases the cached handles. testFactoryWrapperCloseReleasesCachedHandle goes through the factory API, and SnapshotSegmentAbortedTxnProcessorCloseTest verifies the close call. The race test is deterministic, and the handle-count baseline is now taken after initialize().

Two small, non-blocking notes.

First, testCloseRejectsHandleInsertedAfterCloseStarts pins the failed-future return of the recheck in getLedgerHandle, but not its invalidateReadHandle call. The test pauses inside newOpenLedgerOp(), which runs under the map's write lock, so close's scan waits for the insertion and releases the handle itself. Deleting only the invalidateReadHandle in the recheck keeps all tests green. The window it covers (close finishing its scan before the insertion) needs a pause between the first flag check and the parent lookup. I would not block on it.

Second, a closed read-only ledger can stay the owner of the entry cache that RangeEntryCacheManagerImpl.getEntryCache registers by ledger name. ManagedLedgerFactoryImpl.close(ManagedLedger) returns early for a ledger that is not in its map, so the cache mapping is not removed. A later writable ledger with the same name reuses that cache, and RangeEntryCacheImpl.readFromStorage retries OffloadReadHandleClosedException through ml.reopenReadHandle, which now fails with ManagedLedgerAlreadyClosedException. This needs a read-only ledger to be the first opener, followed by an offloaded-ledger retry, so I consider it low risk. Removing the cache mapping in ReadOnlyManagedLedgerImpl.asyncClose would close it, if you want to.

For #26817: it also changes ReadOnlyManagedLedgerImpl and fixes the handle initialize() opens to read the last add confirmed, which bypasses ledgerCache and is not released by this PR's close. The two touch different methods, so I expect a clean merge, but whichever lands second should rebase and re-run ReadOnlyManagedLedgerHandleCloseTest.

Sorry, something went wrong.

Uh oh!

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

All reactions
@lhotari
Merge branch 'master' into fix/readonly-ledger-handle-cleanup
8d44880
codelipenghui
codelipenghui requested changes Nov 18, 2026
View reviewed changes

@codelipenghui codelipenghui left a comment

Copy link
Copy Markdown
Contributor

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.

I recommend fixing cache ownership before merge. On '8d448806bc', a focused test reproduced the earlier P2: a writable ledger’s offload retry failed because it used a closed read-only ledger. Moving only the reader’s close until after the retry made the same test pass. All 25 selected checked-in tests passed; none exercises that ownership order. The master merge also made the subclass’s close-time cache scan redundant.

Sorry, something went wrong.

Uh oh!

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

All reactions
Comment thread ...org/apache/pulsar/broker/transaction/buffer/impl/SnapshotSegmentAbortedTxnProcessorImpl.java Resolved

Uh oh!

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

Comment thread managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/ReadOnlyManagedLedgerImpl.java Resolved

Uh oh!

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

@void-ptr974
[fix][ml] Use the reading ledger for shared cache retries
c3a612b
Keep the shared entry cache and scope pending reads and handle retries to
 the managed ledger that issued the read. Preserve confirmation bounds
 and cover both cache allocation orders.

Delegate read-handle cleanup to the parent close path and release a
 snapshot recovery ledger when its open finishes after the wait times out.

Assisted-by: Codex
@void-ptr974
[test][ml] Exercise shared cache retries through the public read API
cdd3557
Verify that a writable ledger can reopen an offloaded handle after the
same-name cache creator closes. Cover requester-specific pending read
invalidation and clean up resources in the related ledger and broker tests.

Assisted-by: Codex
@void-ptr974
void-ptr974 marked this pull request as draft November 19, 2026 07:03
lhotari
lhotari approved these changes Nov 19, 2026
View reviewed changes

@lhotari lhotari 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.

LGTM. Thanks for the quick turnaround on the cache-ownership follow-up.

The retry in RangeEntryCacheImpl.java:770-796 now goes through the ledger that issued the read (reader.reopenReadHandle, reader.invalidateLedgerHandle, reader.reopenLedgerHandleIfReplicated) instead of the ledger that happened to register the shared cache, so a closed read-only owner can no longer fail a writable ledger's offload retry. All production callers in ManagedLedgerImpl pass this, and pending reads are keyed by reader identity and completed on that reader's executor. OffloadPrefixReadTest.testAsyncReadEntryRetriesOffloadAfterSharedCacheOwnerCloses covers the read-only-first order through the public read API, and RangeEntryCacheOwnershipTest covers the retry, coalescing and read-boundary combinations.

ReadOnlyManagedLedgerImpl.asyncClose now only sets the flag and delegates, so the cache is drained once. Every branch of the parent's asyncClose drains (fenced, no current ledger, and the write-handle close callback even on failure), and a handle whose open finishes after the drain is closed by the parent's readHandlesReleased handling. testCloseReleasesHandleInsertedAfterCacheDrain closes the ledger inside openLedgerHandleOnCacheMiss and verifies the late handle's closeAsync, which also settles my earlier note about the recheck: it now only rejects the lookup, and the release is pinned. The snapshot recovery path also releases a ledger whose open completes after the wait timed out.

Two small, non-blocking notes.

First, the shared RangeEntryCacheImpl still keeps the first opener as ml for things other than retries: cache-miss stats go to ml.getMbean() (RangeEntryCacheImpl.java:754), and the interceptor (RangeEntryCacheImpl.java:103) and the message-metadata setting (RangeEntryCacheImpl.java:470) come from its configuration. When the first opener was a read-only ledger, a later writable ledger's cache misses are therefore counted on the closed ledger's MBean. This is not new and not a correctness problem for the snapshot case, whose read-only ledger uses the topic's own configuration, so I would leave it unless you want to follow up.

Second, the cross-reader tests in PendingReadsManagerTest and RangeEntryCacheOwnershipTest use equal or contained ranges. I did not find a test with two readers whose pending ranges only partially overlap, so dropping the reader == other.reader check in PendingReadKey.overlaps (PendingReadsManager.java:148) would likely stay green. A small test would pin it.

The PR has no CI checks reported on this head yet, so the new tests have not run in CI.

Sorry, something went wrong.

Uh oh!

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

All reactions
void-ptr974 added 3 commits November 19, 2026 20:17
@void-ptr974
Merge remote-tracking branch 'refs/remotes/pr26816/refine-master' int…
af66ff4
…o codex/pr26816-private-read-cache
@void-ptr974
[fix][ml] Isolate entry caches of read-only managed ledgers
54f0aa7
Give independent read-only ledgers their own entry cache to retain storage retries and read limiting. Clear pending reads on close and keep the existing read signatures for writable ledgers.

Assisted-by: Codex
@void-ptr974
Merge upstream master into fix/readonly-ledger-handle-cleanup
522f93c
@void-ptr974

void-ptr974 commented Nov 19, 2026

Copy link
Copy Markdown
Contributor Author

Thanks @lhotari for pointing out the first-opener metrics and partial-overlap cases in cdd3557, and @codelipenghui for reproducing the offload failure.

In cdd3557, the cache was shared by name, and the read paths passed the requesting ledger down to pending reads and retries. In 54f0aa7, I made the ownership decision at open time. The factory removes a registered writable ledger and its named cache together. A caller-owned read-only ledger can close while a same-name writer is still active, so it now gets a private cache when entry caching is enabled. Its interceptor, cache-miss metrics, and pending reads all belong to that instance. Two readers with partially overlapping ranges now use separate pending-read managers.

Snapshot recovery closes the reader when it finishes. The reader clears its private entryCache’s pending-read index, and the parent releases the handles in ledgerCache, including handles that finish opening after the drain. The private RangeEntryCacheImpl does allocate an empty entry store. I kept it to reuse the existing offload and BookKeeper retries and the factory-wide read limiter. Snapshot recovery already reads each indexed position once and leaves entries uncached on a miss. The trade-off is losing hits on entries cached by another instance and coalescing across instances.

The regression opens the read-only ledger first and the writer second, closes the reader, and verifies that the writer can retry an expired offload handle through the public read API. Temporarily registering the read-only cache by name again reproduced ManagedLedgerAlreadyClosedException. At 522f93c, 145 managed-ledger tests and 3 broker tests passed locally.

All reactions

Sorry, something went wrong.

Uh oh!

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

@void-ptr974
void-ptr974 marked this pull request as ready for review November 19, 2026 13:00
codelipenghui
codelipenghui approved these changes Nov 19, 2026
View reviewed changes
lhotari
lhotari approved these changes Nov 20, 2026
View reviewed changes

@lhotari lhotari 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.

LGTM. Thanks for reworking this. Opening each read-only ledger with its own unregistered entry cache is simpler than routing the requesting ledger through the shared cache. It also removes the ownership questions from the previous round. ManagedLedgerFactoryImpl.close still removes a named cache only when the closing ledger is the registered instance, so a reader closing can no longer affect a same-name writer. OffloadPrefixReadTest.testAsyncReadEntryRetriesOffloadWithPrivateReadOnlyCache covers the reader-first, writer-second order that failed before.

The remaining CI failure (BrokerServiceTopicDeletionTest.setup, a Mockito WrongTypeOfReturnValue while stubbing getTopicPoliciesService) is in code this PR doesn't touch. A rerun should clear it.

Sorry, something went wrong.

Uh oh!

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

All reactions
lhotari added 2 commits November 25, 2026 18:38
@lhotari
Merge branch 'master' into fix/readonly-ledger-handle-cleanup
aa35a58
@lhotari
Merge branch 'master' into fix/readonly-ledger-handle-cleanup
a00f5bb
@lhotari lhotari mentioned this pull request Nov 26, 2026
[improve][ml] Close the backing read-only managed ledger when a factory-opened ReadOnlyCursor is closed #27759
Open
@lhotari
Merge branch 'master' of https://github.com/apache/pulsar into the PR…
b675316
… branch

# Conflicts:
#	managed-ledger/src/test/java/org/apache/bookkeeper/mledger/impl/OffloadPrefixReadTest.java
@void-ptr974

void-ptr974 commented Nov 27, 2026

Copy link
Copy Markdown
Contributor Author

The only test failure in the CI - Unit - Other job on b67531687c was ManagedLedgerTerminationTest.duplicateTerminateAfterCloseSharesExistingAttempt at line 377. The duplicate call failed immediately with ManagedLedgerAlreadyClosedException while the first termination was still waiting for its metadata write.

This also reproduces on master. The fix is in #27763, which lets the duplicate observe the result of the original termination.

All reactions

Sorry, something went wrong.

Uh oh!

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

@Drifter-yh Drifter-yh mentioned this pull request Nov 28, 2026
[fix][ml] Close the backing managed ledger when a factory ReadOnlyCursor is closed #27782
Open
6 of 15 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@lhotari lhotari lhotari approved these changes
@codelipenghui codelipenghui codelipenghui approved these changes
@Denovo1998 Denovo1998 Denovo1998 approved these changes

Uh oh!

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

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

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

4 participants

@void-ptr974 @lhotari @codelipenghui @Denovo1998
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.