[
https://issues.apache.org/jira/browse/TINKERPOP-1126?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
stephen mallette updated TINKERPOP-1126:
----------------------------------------
Assignee: stephen mallette
Fix Version/s: 3.1.2-incubating
> 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
> Assignee: stephen mallette
> Fix For: 3.1.2-incubating
>
>
> 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)