Commit afb539b4 authored by Ronak Sakhuja's avatar Ronak Sakhuja
Browse files

Removed secondary host

parent 3d0cab6d
Pipeline #44924 failed with stage
in 53 seconds
...@@ -42,7 +42,6 @@ public class BlobStoreRetryConfiguration { ...@@ -42,7 +42,6 @@ public class BlobStoreRetryConfiguration {
private long retryDelayInMs = defaultRequestRetryOptions.getRetryDelay().toMillis(); private long retryDelayInMs = defaultRequestRetryOptions.getRetryDelay().toMillis();
private long maxRetryDelayInMs = defaultRequestRetryOptions.getMaxRetryDelay().toMillis(); private long maxRetryDelayInMs = defaultRequestRetryOptions.getMaxRetryDelay().toMillis();
private String retryPolicyTypeValue = DEFAULT_STRING_VALUE; private String retryPolicyTypeValue = DEFAULT_STRING_VALUE;
private String secondaryHost = DEFAULT_STRING_VALUE;
/** /**
* Checks whether an string variable value is configured or not. * Checks whether an string variable value is configured or not.
...@@ -72,13 +71,12 @@ public class BlobStoreRetryConfiguration { ...@@ -72,13 +71,12 @@ public class BlobStoreRetryConfiguration {
retryPolicyType = RetryPolicyType.EXPONENTIAL; retryPolicyType = RetryPolicyType.EXPONENTIAL;
} }
String secondaryHostValue = valueConfigured(this.secondaryHost) ? this.secondaryHost : null;
RequestRetryOptions requestRetryOptions = new RequestRetryOptions(retryPolicyType, maxTries, Duration.ofSeconds(tryTimeoutInSeconds), Duration.ofMillis(retryDelayInMs), Duration.ofMillis(maxRetryDelayInMs), secondaryHostValue); RequestRetryOptions requestRetryOptions = new RequestRetryOptions(retryPolicyType, maxTries, Duration.ofSeconds(tryTimeoutInSeconds), Duration.ofMillis(retryDelayInMs), Duration.ofMillis(maxRetryDelayInMs), null);
CoreLoggerFactory.getInstance().getLogger(LOGGER_NAME).info(String.format("Retry Options on BlobStorage with RetryPolicyType = %s , maxTries = %d , tryTimeout = %d , retryDelay = %d , maxRetryDelay = %d , secondaryHost = %s.", CoreLoggerFactory.getInstance().getLogger(LOGGER_NAME).info(String.format("Retry Options on BlobStorage with RetryPolicyType = %s , maxTries = %d , tryTimeout = %d , retryDelay = %d , maxRetryDelay = %d .",
retryPolicyType, requestRetryOptions.getMaxTries(), requestRetryOptions.getTryTimeoutDuration().getSeconds(), requestRetryOptions.getRetryDelay().toMillis(), requestRetryOptions.getMaxRetryDelay().toMillis(), requestRetryOptions.getSecondaryHost())); retryPolicyType, requestRetryOptions.getMaxTries(), requestRetryOptions.getTryTimeoutDuration().getSeconds(), requestRetryOptions.getRetryDelay().toMillis(), requestRetryOptions.getMaxRetryDelay().toMillis()));
return requestRetryOptions; return requestRetryOptions;
} }
......
...@@ -95,7 +95,6 @@ public class BlobStoreRetryConfigurationTest { ...@@ -95,7 +95,6 @@ public class BlobStoreRetryConfigurationTest {
assertEquals(requestRetryOptions.getTryTimeoutDuration(), defaultRequestRetryOptions.getTryTimeoutDuration()); assertEquals(requestRetryOptions.getTryTimeoutDuration(), defaultRequestRetryOptions.getTryTimeoutDuration());
assertEquals(requestRetryOptions.getRetryDelay(), defaultRequestRetryOptions.getRetryDelay()); assertEquals(requestRetryOptions.getRetryDelay(), defaultRequestRetryOptions.getRetryDelay());
assertEquals(requestRetryOptions.getMaxRetryDelay(), defaultRequestRetryOptions.getMaxRetryDelay()); assertEquals(requestRetryOptions.getMaxRetryDelay(), defaultRequestRetryOptions.getMaxRetryDelay());
assertEquals(requestRetryOptions.getSecondaryHost(), defaultRequestRetryOptions.getSecondaryHost());
} }
@Test @Test
...@@ -108,7 +107,6 @@ public class BlobStoreRetryConfigurationTest { ...@@ -108,7 +107,6 @@ public class BlobStoreRetryConfigurationTest {
assertEquals(requestRetryOptions.getTryTimeoutDuration(), defaultRequestRetryOptions.getTryTimeoutDuration()); assertEquals(requestRetryOptions.getTryTimeoutDuration(), defaultRequestRetryOptions.getTryTimeoutDuration());
assertEquals(requestRetryOptions.getRetryDelay(), defaultRequestRetryOptions.getRetryDelay()); assertEquals(requestRetryOptions.getRetryDelay(), defaultRequestRetryOptions.getRetryDelay());
assertEquals(requestRetryOptions.getMaxRetryDelay(), defaultRequestRetryOptions.getMaxRetryDelay()); assertEquals(requestRetryOptions.getMaxRetryDelay(), defaultRequestRetryOptions.getMaxRetryDelay());
assertEquals(requestRetryOptions.getSecondaryHost(), defaultRequestRetryOptions.getSecondaryHost());
} }
@Test @Test
...@@ -121,7 +119,6 @@ public class BlobStoreRetryConfigurationTest { ...@@ -121,7 +119,6 @@ public class BlobStoreRetryConfigurationTest {
assertEquals(requestRetryOptions.getTryTimeoutDuration(), Duration.ofSeconds(tryTimeoutValue)); assertEquals(requestRetryOptions.getTryTimeoutDuration(), Duration.ofSeconds(tryTimeoutValue));
assertEquals(requestRetryOptions.getRetryDelay(), defaultRequestRetryOptions.getRetryDelay()); assertEquals(requestRetryOptions.getRetryDelay(), defaultRequestRetryOptions.getRetryDelay());
assertEquals(requestRetryOptions.getMaxRetryDelay(), defaultRequestRetryOptions.getMaxRetryDelay()); assertEquals(requestRetryOptions.getMaxRetryDelay(), defaultRequestRetryOptions.getMaxRetryDelay());
assertEquals(requestRetryOptions.getSecondaryHost(), defaultRequestRetryOptions.getSecondaryHost());
} }
@Test @Test
...@@ -136,7 +133,6 @@ public class BlobStoreRetryConfigurationTest { ...@@ -136,7 +133,6 @@ public class BlobStoreRetryConfigurationTest {
assertEquals(requestRetryOptions.getTryTimeoutDuration(), defaultRequestRetryOptions.getTryTimeoutDuration()); assertEquals(requestRetryOptions.getTryTimeoutDuration(), defaultRequestRetryOptions.getTryTimeoutDuration());
assertEquals(requestRetryOptions.getRetryDelay(), Duration.ofMillis(retryDelayValue)); assertEquals(requestRetryOptions.getRetryDelay(), Duration.ofMillis(retryDelayValue));
assertEquals(requestRetryOptions.getMaxRetryDelay(), Duration.ofMillis(maxRetryDelayValue)); assertEquals(requestRetryOptions.getMaxRetryDelay(), Duration.ofMillis(maxRetryDelayValue));
assertEquals(requestRetryOptions.getSecondaryHost(), defaultRequestRetryOptions.getSecondaryHost());
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment