dlg99 opened a new pull request, #16664:
URL: https://github.com/apache/pulsar/pull/16664
### Motivation
In some situations it is possible to encounter case when deletion of a
ManagedLedger deals with cases of already deleted bookie ledgers.
Such cases currently handled as errors even though they are safe to ignore.
Currently, it is impossible to handle these cases because
PulsarManagedLedger returns error that's not mappable into the BK error code
end the end user ends up with obscure `UnexpectedConditionException` (error
code -999) that cannot be distinguished from ledger already deleted case.
### Modifications
1. Made PulsarManagedLedger compatible with BK erros so BK client has a
chance to return correct error. I didn't do this for all
MetadataStoreException, just for the ones where it made sense.
2. Ignored NoSuchLedgerExistsOnMetadataServerException on delete as it is
safe there
### Verifying this change
This change added tests and can be verified as follows:
*(example:)*
- *Added unit tests
### Does this pull request potentially affect one of the following parts:
*If `yes` was chosen, please highlight the changes*
Nothing that I can think of.
BK Error codes can change (on purpose) for the internal components to become
more specific but MetadataStoreException's type didn't change.
- Dependencies (does it add or upgrade a dependency): (yes / no)
- The public API: (yes / no)
- The schema: (yes / no / don't know)
- The default values of configurations: (yes / no)
- The wire protocol: (yes / no)
- The rest endpoints: (yes / no)
- The admin cli options: (yes / no)
- Anything that affects deployment: (yes / no / don't know)
### Documentation
Check the box below or label this PR directly.
Need to update docs?
- [ ] `doc-required`
(Your PR needs to update docs and you will update later)
- [x] `doc-not-needed`
(Please explain why)
- [ ] `doc`
(Your PR contains doc changes)
- [ ] `doc-complete`
(Docs have been already added)
--
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]