You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tinkerpop.apache.org by pieter-gmail <pi...@gmail.com> on 2017/02/09 20:00:20 UTC

RE: static code in TinkerPop

Hi,

I have recently found a bug in Sqlg related to the static nature of
strategies.

In particular it is happening for me on the PathRetractionStep but it
probably a general issue.

Sqlg supports running many graphs in one JVM.

The staticness confuses the state of the strategies when they overlap.

Is it possible to make GlobalCache not static?

Thanks
Pieter

Re: static code in TinkerPop

Posted by Marko Rodriguez <ok...@gmail.com>.
Hey,

> I have recently found a bug in Sqlg related to the static nature of
> strategies.
> 
> In particular it is happening for me on the PathRetractionStep but it
> probably a general issue.
> 
> Sqlg supports running many graphs in one JVM.
> 
> The staticness confuses the state of the strategies when they overlap.
> 
> Is it possible to make GlobalCache not static?

The GlobalCache is not meant for continued usage. Its queried only when a traversal source is created. Traversal sources should be treated like database “connections” as they are heavy weight. However, numerous traversals can be spawned from them (think “queries”). Each traversal source’s strategies can be manipulated using withStrategies() and withoutStrategies(). These manipulations do not effect the GlobalCache (think “local cache”).

Thus, what I’m saying is that you should manipulate strategies at the traversal source level, not the cache level.

HTH,
Marko.

http://markorodriguez.com