jelmini commented on code in PR #1204:
URL: https://github.com/apache/jackrabbit-oak/pull/1204#discussion_r1391244689


##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzureRepositoryLock.java:
##########
@@ -100,7 +105,11 @@ private void refreshLease() {
             try {
                 long timeSinceLastUpdate = (System.currentTimeMillis() - 
lastUpdate) / 1000;
                 if (timeSinceLastUpdate > INTERVAL / 2) {
+                    writeAccessController.disableWriting();

Review Comment:
   What about the performance impact of this change?
   My concern is we are blocking writes at every renewal, even though the lease 
has not expired and writes are still safe. Even a successful call to 
`blob.acquireLease()` could take a long time if Azure is slow.
   
   I would suggest to introduce a RenewalDeadiine timeout, while increasing the 
rate of renewals: for example, if lease duration is 60 seconds, we should renew 
the lease every 5 seconds, but if after a deadline of 40 seconds we couldn't 
renew the lease, then and only then we block the writes.
   



-- 
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: dev-unsubscr...@jackrabbit.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to