diff --git a/ambry-cloud/src/main/java/com/github/ambry/cloud/azure/StorageClient.java b/ambry-cloud/src/main/java/com/github/ambry/cloud/azure/StorageClient.java index 5263ce2076..46c0013e33 100644 --- a/ambry-cloud/src/main/java/com/github/ambry/cloud/azure/StorageClient.java +++ b/ambry-cloud/src/main/java/com/github/ambry/cloud/azure/StorageClient.java @@ -411,20 +411,12 @@ protected BlobServiceAsyncClient createBlobStorageAsyncClient() { } protected BlobServiceClient createBlobStorageSyncClient() { - validateABSAuthConfigs(azureCloudConfig); - Configuration storageConfiguration = new Configuration(); - // Check for network proxy - ProxyOptions proxyOptions = (cloudConfig.vcrProxyHost == null) ? null : new ProxyOptions(ProxyOptions.Type.HTTP, - new InetSocketAddress(cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort)); - if (proxyOptions != null) { - logger.info("Using proxy: {}:{}", cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort); - } - HttpClient client = new NettyAsyncHttpClientBuilder().proxy(proxyOptions).build(); - - // Note: retry decisions are made at CloudBlobStore level. Configure storageClient with no retries. - RequestRetryOptions noRetries = new RequestRetryOptions(RetryPolicyType.FIXED, 1, (Integer) null, null, null, null); try { - return buildBlobServiceSyncClient(client, storageConfiguration, noRetries, azureCloudConfig); + validateABSAuthConfigs(azureCloudConfig); + ProxyOptions proxyOptions = new ProxyOptions(ProxyOptions.Type.HTTP, + new InetSocketAddress(cloudConfig.vcrProxyHost, cloudConfig.vcrProxyPort)); + HttpClient client = new NettyAsyncHttpClientBuilder().proxy(proxyOptions).build(); + return buildBlobServiceSyncClient(client, new Configuration(), new RequestRetryOptions(), azureCloudConfig); } catch (MalformedURLException | InterruptedException | ExecutionException ex) { logger.error("Error building ABS blob service client: {}", ex.getMessage()); throw new IllegalStateException(ex);