poorbarcode opened a new pull request, #3562:
URL: https://github.com/apache/bookkeeper/pull/3562
Descriptions of the changes in this PR:
### Motivation
When we execute `bkClient.openLedger(ledgerId)`, the execution flow is as
follows:
1. start opening the ledger
2. get ledger meta
3. read the last confirmed entry
4. open ledger success
If we get the correct ledgerMeta at step 2, this means that this ledger has
not been deleted. If step 3 times out, we should try again to make sure the
ledger exists until we get a clear response from the BK server.<strong>(High
light)</strong>However, in the current implementation, the timeout exception is
rewritten as a `LedgerRecoveryException`, making it impossible to determine
whether we should retry.
Log:
```
Oct 17, 2022 22:54:05.818 [BookKeeperClientWorker-OrderedExecutor-16-0]
ERROR org.apache.bookkeeper.client.ReadLastConfirmedOp - While
readLastConfirmed ledger: 59158316 did not hear success responses from all
quorums, QuorumCoverage(e:2,w:2,a:2) = [-23, -23]
Oct 17, 2022 22:54:05.818 [BookKeeperClientWorker-OrderedExecutor-16-0] INFO
org.apache.bookkeeper.mledger.impl.ManagedCursorImpl -
[order/org-217/persistent/p1010-tx] Opened ledger 59158316 for consumer
order-service. rc=-10
```
Looking at the ledger metadata:
```
LedgerMetadata{formatVersion=3, ensembleSize=2, writeQuorumSize=2,
ackQuorumSize=2, state=IN_RECOVERY, digestType=CRC32C, password=base64:,
ensembles={0=[***:3181, ***:3181]}, customMetadata={component=***,
pulsar/managed-ledger=***, pulsar/cursor=***, application=***}}
```
### Changes
When calling openLedgerOp, do not rewritten `TiemoutException` as a
`LedgerRecoveryException`
--
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]