dao-jun commented on code in PR #22531:
URL: https://github.com/apache/pulsar/pull/22531#discussion_r1571472864
##########
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImplV2.java:
##########
@@ -303,7 +308,7 @@ public static ReadHandle open(ScheduledExecutorService
executor,
VersionCheck versionCheck,
long ledgerId, int readBufferSize,
LedgerOffloaderStats offloaderStats,
String managedLedgerName)
- throws IOException {
+ throws IOException,
BKException.BKNoSuchLedgerExistsOnMetadataServerException {
Review Comment:
But from my understanding,
```java
Blob blob = blobStore.getBlob(bucket, key, new
GetOptions().range(startRange, endRange));
```
the `blob` should be the offloaded ledger, if `blob == null`, shouldn't it
be means that the ledger not found?
And I've checked bookkeeper, see
https://github.com/apache/bookkeeper/blob/master/bookkeeper-server/src/main/java/org/apache/bookkeeper/bookie/LedgerDescriptor.java#L47
```java
static LedgerDescriptor createReadOnly(long ledgerId,
LedgerStorage ledgerStorage)
throws IOException, Bookie.NoLedgerException {
if (!ledgerStorage.ledgerExists(ledgerId)) {
throw new Bookie.NoLedgerException(ledgerId);
}
return new LedgerDescriptorReadOnlyImpl(ledgerId, ledgerStorage);
}
```
If the ledger id isn't in the `ledgerStorage`, it throws `NoLedgerException`
--
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]