lhotari commented on code in PR #24344: URL: https://github.com/apache/pulsar/pull/24344#discussion_r2106702214
########## tiered-storage/file-system/src/main/java/org/apache/bookkeeper/mledger/offload/filesystem/impl/FileSystemManagedLedgerOffloader.java: ########## @@ -194,11 +194,15 @@ private LedgerReader(ReadHandle readHandle, @Override public void run() { - if (readHandle.getLength() == 0 || !readHandle.isClosed() || readHandle.getLastAddConfirmed() < 0) { + if (!readHandle.isClosed() || readHandle.getLastAddConfirmed() < 0) { promise.completeExceptionally( new IllegalArgumentException("An empty or open ledger should never be offloaded")); return; } + if (readHandle.getLength() <= 0) { + log.warn("Ledger [{}] has a zero length, but it contains {} entries. since it contains entries," + + " attempts to offload", readHandle.getLastAddConfirmed() + 1, readHandle.getId()); Review Comment: ```suggestion log.warn("Ledger [{}] has a zero length, but it contains {} entries. " + " Attemping to offload ledger since it contains entries.", readHandle.getId(), readHandle.getLastAddConfirmed() + 1); ``` -- 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: commits-unsubscr...@pulsar.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org