Kieran Sherlock created TINKERPOP-1126:
------------------------------------------
Summary: A single Host spawns many reconnect tasks
Key: TINKERPOP-1126
URL: https://issues.apache.org/jira/browse/TINKERPOP-1126
Project: TinkerPop
Issue Type: Bug
Components: driver
Affects Versions: 3.1.0-incubating
Reporter: Kieran Sherlock
While attempting to recover a connection to a gremlin server that has gone
offline, the Host object spawns many reconnect tasks
The following code in Host.makeUnavailable() will always create and schedule a
new Runnable no matter the value of reconnectionAttempt
{code}
reconnectionAttempt.compareAndSet(null,
this.cluster.executor().scheduleAtFixedRate(() -> {
logger.debug("Trying to reconnect to dead host at
{}", this);
if (reconnect.apply(this)) reconnected();
},
cluster.connectionPoolSettings().reconnectInitialDelay,
cluster.connectionPoolSettings().reconnectInterval,
TimeUnit.MILLISECONDS));
{code}
It is just that the ScheduledFuture returned by scheduleAtFixedRate will be
ignored if reconnectionAttempt != null.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)