lhotari commented on code in PR #19783:
URL: https://github.com/apache/pulsar/pull/19783#discussion_r2104049863


##########
tiered-storage/jcloud/src/main/java/org/apache/bookkeeper/mledger/offload/jcloud/impl/BlobStoreBackedReadHandleImpl.java:
##########
@@ -120,6 +123,7 @@ public CompletableFuture<LedgerEntries> readAsync(long 
firstEntry, long lastEntr
         }
         CompletableFuture<LedgerEntries> promise = new CompletableFuture<>();
         executor.execute(() -> {
+            touch();

Review Comment:
   > I think I need to clarify the scenario
   
   I understood that scenario earlier and I replied in 
https://github.com/apache/pulsar/pull/19783#discussion_r2099958616 . The 
assumption in the current solution is that tasks are handled before they are 
evicted. 
   
   The code will complete with an exception if the scenario you are describing 
were to happen.
   ```java
           touch();
           executor.execute(() -> {
               touch();
               if (state == State.Closed) {
                   log.warn("Reading a closed read handler. Ledger ID: {}, Read 
range: {}-{}",
                           ledgerId, firstEntry, lastEntry);
                   promise.completeExceptionally(new 
ManagedLedgerException.OffloadReadHandleClosedException());
                   return;
               }
   ```
   
   I'm not claiming that the scenario that you are presenting couldn't happen. 
It's just that it's something that is not likely to happen. 
   
   What more clarification is needed?



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

Reply via email to