zymap commented on a change in pull request #12123:
URL: https://github.com/apache/pulsar/pull/12123#discussion_r715997737
##########
File path:
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedInputStreamImpl.java
##########
@@ -115,7 +115,8 @@ public int read(byte[] b, int off, int len) throws
IOException {
}
@Override
- public void seek(long position) {
+ public void seek(long position) throws IOException {
+ refillBufferIfNeeded();
Review comment:
Because we add a new line in the `BlobStoreBackedHandleImpl`:
```
inputStream.seek(index.getIndexEntryForEntry(firstEntry).getDataOffset());
```
Before this, the readAsync will use readInt() to trigger the stream to fill
buffer, then to seek. Currently, we will execute seek before any read
operation. We need to fill the buffer to let it fetch the data.
--
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]