Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Done
-
3.1.0-incubating
-
None
Description
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
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));
It is just that the ScheduledFuture returned by scheduleAtFixedRate will be ignored if reconnectionAttempt != null.
Attachments
Issue Links
- is related to
-
TINKERPOP-1125 RoundRobin load balancing always uses the second Host when size = 2
- Closed