seropian commented on code in PR #2982:
URL: https://github.com/apache/jackrabbit-oak/pull/2982#discussion_r3543576410


##########
oak-blob-cloud-azure/src/main/java/org/apache/jackrabbit/oak/blob/cloud/azure/blobstorage/AzureDataStoreWrapper.java:
##########
@@ -0,0 +1,301 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage;
+
+import 
org.apache.jackrabbit.oak.blob.cloud.azure.blobstorage.v12.AzureDataStoreV12;
+import org.apache.jackrabbit.oak.commons.PropertiesUtil;
+import org.apache.jackrabbit.oak.plugins.blob.AbstractSharedCachingDataStore;
+import 
org.apache.jackrabbit.oak.plugins.blob.datastore.AbstractDataStoreService;
+import org.apache.jackrabbit.oak.plugins.blob.datastore.directaccess.*;
+import org.apache.jackrabbit.oak.spi.blob.data.DataIdentifier;
+import org.apache.jackrabbit.oak.spi.blob.data.DataRecord;
+import org.apache.jackrabbit.oak.spi.blob.data.DataStore;
+import org.apache.jackrabbit.oak.spi.blob.data.DataStoreException;
+import org.apache.jackrabbit.oak.stats.StatisticsProvider;
+import org.jetbrains.annotations.NotNull;
+import org.jetbrains.annotations.Nullable;
+import org.osgi.framework.Constants;
+import org.osgi.framework.ServiceRegistration;
+import org.osgi.service.component.ComponentContext;
+import org.osgi.service.component.annotations.Component;
+import org.osgi.service.component.annotations.ConfigurationPolicy;
+import org.osgi.service.component.annotations.Deactivate;
+import org.osgi.service.component.annotations.Reference;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.InputStream;
+import java.net.URI;
+import java.util.*;
+
+
+/**
+ * OSGi component that selects between Azure SDK v8 ({@link AzureDataStore}) 
and v12
+ * ({@link AzureDataStoreV12}) at activation time based on configuration, then 
registers the
+ * chosen implementation under the legacy v8 PID so consumers bound to that 
PID keep working.
+ *
+ * <p>Replaces the old dual-service architecture (AzureDataStoreService + 
AzureDataStoreServiceV12
+ * + AzureSDKConditionGate) that caused deadlocks during OSGi service swap on 
FT toggle.
+ */
+@Component(
+        name = AzureDataStoreWrapper.NAME,
+        configurationPid = AzureDataStoreWrapper.NAME,
+        configurationPolicy = ConfigurationPolicy.REQUIRE
+)
+public class AzureDataStoreWrapper extends AbstractDataStoreService {
+
+    private static final Logger log = 
LoggerFactory.getLogger(AzureDataStoreWrapper.class);
+
+    public static final String NAME = 
"org.apache.jackrabbit.oak.plugins.blob.datastore.AzureDataStore";

Review Comment:
   added comment in #2989 



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