diff --git a/atlasdb-conjure/src/main/java/com/palantir/atlasdb/http/v2/ConjureJavaRuntimeTargetFactory.java b/atlasdb-conjure/src/main/java/com/palantir/atlasdb/http/v2/ConjureJavaRuntimeTargetFactory.java index f987111633b..51e7c0d7d0f 100644 --- a/atlasdb-conjure/src/main/java/com/palantir/atlasdb/http/v2/ConjureJavaRuntimeTargetFactory.java +++ b/atlasdb-conjure/src/main/java/com/palantir/atlasdb/http/v2/ConjureJavaRuntimeTargetFactory.java @@ -63,7 +63,6 @@ public InstanceAndVersion createProxy( addAtlasDbRemotingAgent(parameters.userAgent()), HOST_METRICS_REGISTRY, clientConfiguration); - client = FastFailoverProxy.newProxyInstance(type, client); return wrapWithVersion(client); } diff --git a/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/EteSetup.java b/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/EteSetup.java index d48e305a370..5dfaf69850e 100644 --- a/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/EteSetup.java +++ b/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/EteSetup.java @@ -198,7 +198,7 @@ private static T createClientToMultipleNodes(Class clazz, List no .sslConfiguration(SSL_CONFIGURATION) .build(), clazz, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING); } private static T createClientFor(Class clazz, String host, short port) { @@ -208,6 +208,6 @@ private static T createClientFor(Class clazz, String host, short port) { Optional.of(TRUST_CONTEXT), uri, clazz, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING); } } diff --git a/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/TimeLockMigrationEteTest.java b/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/TimeLockMigrationEteTest.java index a6691da08cc..0f5ebd0726d 100644 --- a/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/TimeLockMigrationEteTest.java +++ b/atlasdb-ete-tests/src/test/java/com/palantir/atlasdb/ete/TimeLockMigrationEteTest.java @@ -187,7 +187,7 @@ private static T createEteClientFor(Class clazz) { Optional.empty(), uri, clazz, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING); } private static TimestampService createTimeLockTimestampClient() { @@ -197,6 +197,6 @@ private static TimestampService createTimeLockTimestampClient() { Optional.empty(), uri, TimestampService.class, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING); } } diff --git a/atlasdb-tests-shared/src/main/java/com/palantir/atlasdb/http/TestProxyUtils.java b/atlasdb-tests-shared/src/main/java/com/palantir/atlasdb/http/TestProxyUtils.java index e4fe0bb2983..799ddbd6ad5 100644 --- a/atlasdb-tests-shared/src/main/java/com/palantir/atlasdb/http/TestProxyUtils.java +++ b/atlasdb-tests-shared/src/main/java/com/palantir/atlasdb/http/TestProxyUtils.java @@ -27,7 +27,7 @@ public final class TestProxyUtils { .maximumConjureRemotingProbability(1.0) .build(); - public static final AuxiliaryRemotingParameters AUXILIARY_REMOTING_PARAMETERS + public static final AuxiliaryRemotingParameters AUXILIARY_REMOTING_PARAMETERS_RETRYING = AuxiliaryRemotingParameters.builder() .shouldLimitPayload(false) .userAgent(UserAgent.of(UserAgent.Agent.of("bla", "0.1.2"))) diff --git a/changelog/@unreleased/pr-4370.v2.yml b/changelog/@unreleased/pr-4370.v2.yml new file mode 100644 index 00000000000..fe51e9c1caa --- /dev/null +++ b/changelog/@unreleased/pr-4370.v2.yml @@ -0,0 +1,10 @@ +type: fix +fix: + description: We no longer create a `FastFailoverProxy` when creating a single node + proxy. Previously, if this was created when talking to an individual TimeLock + node that was not the leader (or a service that would otherwise return `308`s), + we would spin for about 10 seconds before returning. Users of failover proxies + to TimeLock (e.g. if using the timestamp or lock services from a `TransactionManager`) + are unaffected. + links: + - https://github.com/palantir/atlasdb/pull/4370 diff --git a/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/IsolatedPaxosTimeLockServerIntegrationTest.java b/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/IsolatedPaxosTimeLockServerIntegrationTest.java index 301b086b7f3..8509a6e15b7 100644 --- a/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/IsolatedPaxosTimeLockServerIntegrationTest.java +++ b/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/IsolatedPaxosTimeLockServerIntegrationTest.java @@ -94,7 +94,7 @@ private static T createProxyForInternalNamespacedTestService(Class clazz) PaxosTimeLockConstants.CLIENT_PAXOS_NAMESPACE, CLIENT), clazz, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING); } } diff --git a/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/PaxosTimeLockServerIntegrationTest.java b/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/PaxosTimeLockServerIntegrationTest.java index ef8a9ec1dab..9ce5e28fbf9 100644 --- a/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/PaxosTimeLockServerIntegrationTest.java +++ b/timelock-server/src/integTest/java/com/palantir/atlasdb/timelock/PaxosTimeLockServerIntegrationTest.java @@ -121,7 +121,7 @@ public static void waitForClusterToStabilize() { Optional.of(TestProxies.TRUST_CONTEXT), "https://localhost:" + TIMELOCK_SERVER_HOLDER.getTimelockPort(), PingableLeader.class, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING); Awaitility.await() .atMost(30, TimeUnit.SECONDS) .pollInterval(1, TimeUnit.SECONDS) diff --git a/timelock-server/src/testCommon/java/com/palantir/atlasdb/timelock/util/TestProxies.java b/timelock-server/src/testCommon/java/com/palantir/atlasdb/timelock/util/TestProxies.java index 3a6804886af..9048a1bea80 100644 --- a/timelock-server/src/testCommon/java/com/palantir/atlasdb/timelock/util/TestProxies.java +++ b/timelock-server/src/testCommon/java/com/palantir/atlasdb/timelock/util/TestProxies.java @@ -66,7 +66,7 @@ public T singleNode(Class serviceInterface, String uri) { Optional.of(TRUST_CONTEXT), uri, serviceInterface, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS)); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING)); } public T failoverForClient(String client, Class serviceInterface) { @@ -79,7 +79,7 @@ public T failover(Class serviceInterface, List uris) { new MetricRegistry(), ImmutableServerListConfig.builder().addAllServers(uris).sslConfiguration(SSL_CONFIGURATION).build(), serviceInterface, - TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS)); + TestProxyUtils.AUXILIARY_REMOTING_PARAMETERS_RETRYING)); } public List getServerUris() {