GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||
GeezerVison is showing github.com — [fix][broker] Cancel queued transaction snapshot recovery on topic close by Demogorgon314 · Pull Request #26335 · apache/pulsar Conversation
Member
MotivationTransaction snapshot recovery tasks can remain queued after a topic is closed. Modifications
Topic close may now wait for an in-flight recovery I/O operation to finish before releasing snapshot resources. Does this pull request potentially affect one of the following parts:If the box was checked, please highlight the changes
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Denovo1998
requested changes
Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
Demogorgon314
requested review from
BewareMyPower,
RobertIndie,
codelipenghui,
coderzc,
gaoran10,
lhotari,
merlimat and
poorbarcode
lhotari
requested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks for taking this on — the underlying problem is real, and the shape of the fix (a per-attempt state machine plus a My concern is not the barrier itself but what ended up behind it. Because One unrelated, pre-existing bug I noticed while reading
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page. Cancel queued snapshot recovery tasks when the transaction buffer closes and wait for running recovery before releasing snapshot resources. This prevents the recovery executor queue from retaining closed topics and managed ledgers. …ce in TransactionTest …d recovery work to finish … after failed deletion Run blocking replay on the snapshot recovery executor and cancel recovery only when the buffer is closed. Gate cursor setup before starting recovery and cover transaction executor responsiveness and failed topic deletion. …very on topic close Remove same-instance recovery retry coverage and consolidate post-recovery close assertions. Test late recovery completion with a standard future instead of intercepting continuation registration. Assisted-by: Codex
Demogorgon314
force-pushed
the
Demogorgon314/Cancel-queued-transaction-snapshot-recovery-on-topic-close
branch
from
7259653 to
29d2141
Compare
lhotari
requested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. All six points from my last review are addressed, and the way they are addressed is better than what I asked for. Rather than widening the close barrier you narrowed it to processor-owned work and made the replay itself a separately cancellable task that observes close. One new problem, and it is the only thing I would hold on. Taking the transaction buffer's monitor in Two smaller notes, neither blocking:
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. Uh oh!
There was an error while loading. Please reload this page.
lhotari
requested changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The lock-order fix landed in the shape I suggested and it holds up on inspection: One edge of the same cycle is still open, and it is one I missed last round rather than anything new here: Nothing else in the delta needs attention; it is exactly the requested edits plus the test.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page. …tside buffer lock … transaction aborts
lhotari
approved these changes
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Both open points are closed, and I checked the code rather than taking the reply for it.
Lines 179 to 183 in a839501
One non-blocking flag on the second commit, detail inline: moving The Otherwise this looks good to me.
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactionsUh oh!
There was an error while loading. Please reload this page.
Denovo1998
approved these changes
Uh oh!
There was an error while loading. Please reload this page.
9 of 10 tasks
lhotari
added a commit
that referenced
this pull request
… release assertion Fix the replay fixture introduced by fb093d2 ([fix][broker] Cancel queued transaction snapshot recovery on topic close, #26335), cherry-picked from d2bc207. Upstream and branch-4.2 mock Entry.getMessageMetadata(), so the fixture needs neither serialized metadata nor a real reference-counted entry. Branch-4.0 lacks that API and parses metadata from the entry buffer. The backport therefore replaced the mock with a serialized EntryImpl, but omitted required producerName, sequenceId and publishTime fields and retained Mockito.verify(marker).release() on the real entry. It also retained the buffer's original reference after EntryImpl.create. Build valid commit/abort markers with the production marker helpers, release the original buffer reference, and assert that recovery releases the remaining reference instead of verifying a non-mock object. Validation: all 8 TopicTransactionBufferCloseTest cases pass; Checkstyle passes.
Radiancebobo
pushed a commit
to Radiancebobo/pulsar
that referenced
this pull request
This was referenced
nodece
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
…ose (apache#26335) (cherry picked from commit d2bc207)
nodece
added a commit
to ascentstream/pulsar
that referenced
this pull request
…ired metadata fields, real EntryImpl instead of mock verify, snapshot stub)
nodece
pushed a commit
to ascentstream/pulsar
that referenced
this pull request
…ose (apache#26335) (cherry picked from commit d2bc207)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
ReviewersUh oh!
There was an error while loading. Please reload this page. AssigneesProjectsDevelopmentSuccessfully merging this pull request may close these issues. Uh oh!
There was an error while loading. Please reload this page. 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. |