hangc0276 commented on a change in pull request #2870:
URL: https://github.com/apache/bookkeeper/pull/2870#discussion_r740686872
##########
File path:
bookkeeper-server/src/main/java/org/apache/bookkeeper/client/BookKeeperAdmin.java
##########
@@ -798,13 +835,20 @@ public void openComplete(int rc, final LedgerHandle lh,
Object ctx) {
@Override
public void openComplete(int newrc, final LedgerHandle
newlh, Object newctx) {
if (newrc != BKException.Code.OK) {
- LOG.error("BK error close ledger: " + lId,
BKException.create(newrc));
- finalLedgerIterCb.processResult(newrc, null,
null);
+ if (skipUnrecoverableLedgers) {
Review comment:
For asyncOpenLedger operation, the rc only has
`BKException.Code.ReadException` or `Exception.Code.OK`
```java
lh.asyncReadLastConfirmed(new ReadLastConfirmedCallback() {
@Override
public void readLastConfirmedComplete(int rc,
long lastConfirmed, Object ctx) {
if (rc != BKException.Code.OK) {
closeLedgerHandle();
openComplete(bk.getReturnRc(BKException.Code.ReadException), null);
} else {
lh.lastAddConfirmed = lh.lastAddPushed =
lastConfirmed;
openComplete(BKException.Code.OK, lh);
}
}
}, null);
```
So we doesn't need to check `NoSuchEntryException`.
--
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]