lhotari commented on code in PR #24344: URL: https://github.com/apache/pulsar/pull/24344#discussion_r2106700473
########## 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: The given params are in different order in the log message. Please also revisit the log message. -- 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