This is an automated email from the ASF dual-hosted git repository. penghui pushed a commit to branch branch-2.8 in repository https://gitbox.apache.org/repos/asf/pulsar.git
commit c7618163fcc98efdc392bf0b277b9abab62f5f1e Author: Hang Chen <[email protected]> AuthorDate: Tue Mar 15 20:39:43 2022 +0800 fix incorrect warn log (#14685) ### Motivation When read offload data failed, it prints a warn log. However, the actual read entryId doesn't print correctly, which will makes hard to debug. ``` WARN org.apache.bookkeeper.mledger.offload.jcloud.impl.BlobStoreBackedReadHandleImpl - Read an unexpected entry id [] which is smaller than the next expected entry id 49648, seeking to the right position ``` ### Modification 1. Print correct actual entryId (cherry picked from commit bcba273b854536b7f35872af3f60ac197229444e) --- .../mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java b/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java index f4dc1b8..73a4dd7 100644 --- a/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java +++ b/tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java @@ -152,7 +152,7 @@ public class BlobStoreBackedReadHandleImpl implements ReadHandle { } else if (entryId < nextExpectedId && !index.getIndexEntryForEntry(nextExpectedId).equals(index.getIndexEntryForEntry(entryId))) { log.warn("Read an unexpected entry id {} which is smaller than the next expected entry id {}" - + ", seeking to the right position", entries, nextExpectedId); + + ", seeking to the right position", entryId, nextExpectedId); inputStream.seek(index.getIndexEntryForEntry(nextExpectedId).getDataOffset()); } else if (entryId > lastEntry) { // in the normal case, the entry id should increment in order. But if there has random access in
