jsedding commented on code in PR #2850:
URL: https://github.com/apache/jackrabbit-oak/pull/2850#discussion_r3093157085


##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/v8/AzurePersistenceV8.java:
##########
@@ -122,7 +131,8 @@ private CloudAppendBlob getAppendBlob(String path) throws 
IOException {
         }
     }
 
-    private static void attachRemoteStoreMonitor(RemoteStoreMonitor 
remoteStoreMonitor) {
+    private void attachRemoteStoreMonitor(RemoteStoreMonitor 
remoteStoreMonitor) {
+        this.remoteStoreMonitor.set(remoteStoreMonitor);

Review Comment:
   Would it make sense to only allow `RemoteStoreMonitor` to be set once?
   
   ```suggestion
           this.remoteStoreMonitor.getAndUpdate(oldValue -> {
               if (oldValue == null) {
                   return remoteStoreMonitor;
               }
               throw new IllegalStateException("attachRemoteStoreMonitor may 
only be called once");
           });
   ```



##########
oak-segment-azure/src/main/java/org/apache/jackrabbit/oak/segment/azure/AzurePersistence.java:
##########
@@ -141,6 +150,7 @@ private AppendBlobClient getAppendBlob(String path) throws 
IOException {
     }
 
     private void attachRemoteStoreMonitor(RemoteStoreMonitor 
remoteStoreMonitor) {
+        this.remoteStoreMonitor.set(remoteStoreMonitor);

Review Comment:
   See comment for V8.



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