GremlinFactory must return precached Client (org.apache.tinkerpop.gremlin.driver.Client)
Current Behavior
GremlinFactory create new non reusable pooled connections on each database operations.
Thus after some time Gremlin driver thows an exceptions related by buffer overflow, timeouts.
public Client getGremlinClient() {
if (this.gremlinCluster == null) {
this.gremlinCluster = this.createGremlinCluster();
}
// Create connection pool with size 2 each time. Memory leak.
// Unexpexted behavior after some tme
return this.gremlinCluster.connect();
}
Possible Solution
Extend GremlinFactory by custom @Component implementation like:
Expected Behavior
GremlinFactory must return precached Client (org.apache.tinkerpop.gremlin.driver.Client)
Current Behavior
GremlinFactory create new non reusable pooled connections on each database operations. Thus after some time Gremlin driver thows an exceptions related by buffer overflow, timeouts.
Possible Solution
Extend GremlinFactory by custom
@Component
implementation like:and register it as
@Bean @Primary
in Spring context.Steps to Reproduce (for bugs)
Just try to store some huge data to the Gremlin