[ 
https://issues.apache.org/jira/browse/TINKERPOP3-696?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14554317#comment-14554317
 ] 

Dylan Millikin commented on TINKERPOP3-696:
-------------------------------------------

I see. I agree that isolation is important. As far as TINKERPOP3-553 goes and 
how it may sort things out here I'm a little concerned about the complexity of 
the resulting scripts. It could turn an otherwise trivial configuration process 
into something a  little more tedious for people who aren't all that familiar 
with the stack.

To be fair though, I'm not sure it's good practice to create elements in 
configuration initializing scripts anyways. You should usually use your own 
migration system, fixtures, or initializing scripts above the driver layer.
With that being said it's still very practical for anything bellow those 
layers, namely :
- driver testing
- setting up example graphs to play with in gremlin-console

Out of curiosity, how ressource intensive is the process of opening a session 
(if at all quantifiable)?

> Gremlin-server running gremlin-groovy[scripts] on new session
> -------------------------------------------------------------
>
>                 Key: TINKERPOP3-696
>                 URL: https://issues.apache.org/jira/browse/TINKERPOP3-696
>             Project: TinkerPop 3
>          Issue Type: Improvement
>          Components: server
>            Reporter: Dylan Millikin
>            Assignee: stephen mallette
>            Priority: Minor
>             Fix For: 3.0.0.GA
>
>
> Hey,
> I don't know if this is expected behavior, it seems like it may be but on the 
> off chance it isn't : When sending a request to gremlin-server with 
> {{opProcessor = 'session'}} the session is properly created but the 
> initializing scripts set in the {{gremlin-server.yaml}} configuration are run 
> every time. Resulting in the following warning:
> {code}[WARN] GremlinExecutor - Could not initialize gremlin-groovy 
> ScriptEngine with scripts/generate-classic.groovy as script could not be 
> evaluated - javax.script.ScriptException: java.lang.IllegalArgumentException: 
> Vertex with id already exists: 1{code}
> This comes from the fact that {{scriptEngines}} are loaded on session 
> creation. I'm guessing this is required? But running initializing scripts 
> could be dangerous.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to