danielcweeks commented on code in PR #4912:
URL: https://github.com/apache/iceberg/pull/4912#discussion_r898556389


##########
aws/src/main/java/org/apache/iceberg/aws/s3/S3InputStream.java:
##########
@@ -88,23 +96,69 @@ public void seek(long newPos) {
 
   @Override
   public int read() throws IOException {
-    Preconditions.checkState(!closed, "Cannot read: already closed");
-    positionStream();
+    int[] byteRef = new int[1];

Review Comment:
   This is less than ideal but Tasks is a little limited in this area because 
it's really based on threaded execution and we're reusing it here for retry.  
It might be worth exploring whether we can tweak Tasks to support this usecase:
   
   Ideally we'd have something like:
   
   ```java
   int read = Tasks.single()
       .exponentialBackoff(...)
       ...
       run(<funciton>);
   ```
   
   



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to