dlg99 opened a new pull request #12071:
URL: https://github.com/apache/pulsar/pull/12071
<!--
### Contribution Checklist
- Name the pull request in the form "[Issue XYZ][component] Title of the
pull request", where *XYZ* should be replaced by the actual issue number.
Skip *Issue XYZ* if there is no associated github issue for this pull
request.
Skip *component* if you are unsure about which is the best component.
E.g. `[docs] Fix typo in produce method`.
- Fill out the template below to describe the changes contributed by the
pull request. That will give reviewers the context they need to do the review.
- Each pull request should address only one issue, not mix up code from
multiple issues.
- Each commit in the pull request has a meaningful commit message
- Once all items of the checklist are addressed, remove the above text and
this checklist, leaving only the filled out template below.
**(The sections below can be removed for hotfixes of typos)**
-->
Master Issue: #12070
### Motivation
Debezium connector hung and failed to restart, "Failed to get batch size for
entry .. No such ledger exists on Metadata Server" logged for the offset topic.
There is a long time interval between error, ML init, and the operation
(getLastMessageId) that crashed the connector.
Currently ML in such inconsistent state can load/initialize until some call
triggers an error.
This change fails ML init immediately to simplify troubleshooting and bring
the problem to attention sooner.
I could not repro the situation that lead to original problem, possibly
something on the bookie side but the relevant logs were gone.
I did mimic the corrupt state via the unit test.
### Modifications
Fail managed ledger initialization if LCE belongs to non-existing ledger.
### Verifying this change
Added unit test
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
No
### Documentation
Check the box below and label this PR (if you have committer privilege).
Need to update docs?
- [x] no-need-doc
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]