This is an automated email from the ASF dual-hosted git repository. kenhuuu pushed a commit to branch TINKERPOP-2821 in repository https://gitbox.apache.org/repos/asf/tinkerpop.git
commit 1d8c66d510847b1841ed605d84bbcb12d5b9360e Author: Ken Hu <[email protected]> AuthorDate: Mon Sep 8 17:06:35 2025 -0700 TINKERPOP-2821 Remove request routing via host in RequestMessage. This was originally implemented to support remote traversal side effects but that functionality has been removed. Removing this as well to reduce confusion over the different usages of ARGS_HOST in the driver versus the server. --- .../java/org/apache/tinkerpop/gremlin/driver/Client.java | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java index fc706b8536..989a00d41d 100644 --- a/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java +++ b/gremlin-driver/src/main/java/org/apache/tinkerpop/gremlin/driver/Client.java @@ -502,19 +502,7 @@ public abstract class Client { */ @Override protected Connection chooseConnection(final RequestMessage msg) throws TimeoutException, ConnectionException { - final Iterator<Host> possibleHosts; - if (msg.optionalArgs(Tokens.ARGS_HOST).isPresent()) { - // looking at this code about putting the Host on the RequestMessage in light of 3.5.4, not sure - // this is being used as intended here. server side usage is to place the channel.remoteAddress - // in this token in the status metadata for the response. can't remember why it is being used this - // way here exactly. created TINKERPOP-2821 to examine this more carefully to clean this up in a - // future version. - final Host host = (Host) msg.getArgs().get(Tokens.ARGS_HOST); - msg.getArgs().remove(Tokens.ARGS_HOST); - possibleHosts = IteratorUtils.of(host); - } else { - possibleHosts = this.cluster.loadBalancingStrategy().select(msg); - } + final Iterator<Host> possibleHosts = this.cluster.loadBalancingStrategy().select(msg); // try a random host if none are marked available. maybe it will reconnect in the meantime. better than // going straight to a fast NoHostAvailableException as was the case in versions 3.5.4 and earlier
