Is there a way to specify a query execution timeout via the GremlinLangScriptEngine?
I'm adding a way to specify a query timeout when running queries via G.V(). On the G.V() playground which uses TinkerGraph internally, we "submit" queries directly to the in-memory graph via the GremlinLangScriptEngine. Is there an equivalent of adding a timeout as seen in the Client object via the RequestOptions?
Solution:Jump to solution
no, it's just like standard
ScriptEngine
implementations in that it operates in the current thread without interrupt. we'd wrapped the GremlinScriptEngine
up into the GremlinExecutor
to try to generalize behavior for timeouts and Future
based execution. you would have to use that class to get that sort of behavior and avoid direct use of the GremlinLangScriptEngine
directly.2 Replies
Solution
no, it's just like standard
ScriptEngine
implementations in that it operates in the current thread without interrupt. we'd wrapped the GremlinScriptEngine
up into the GremlinExecutor
to try to generalize behavior for timeouts and Future
based execution. you would have to use that class to get that sort of behavior and avoid direct use of the GremlinLangScriptEngine
directly.that makes perfect sense, I think for my use case it's acceptable to just not offer the ability to timeout queries for in-memory graphs