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


##########
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:
   Additionally, I think the following solution is much simpler
   
   ```
   public void touch() {
     this.refCnf += 1; // the LedgerHandle only will be released if its refCnf 
is "0"
     this. lastAccessTimestamp = System.currentTimeMillis();
   }
   ```



##########
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:
   Additionally, I think the following solution is much simpler
   
   ```java
   public void touch() {
     this.refCnf += 1; // the LedgerHandle only will be released if its refCnf 
is "0"
     this. lastAccessTimestamp = System.currentTimeMillis();
   }
   ```



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