[ https://issues.apache.org/jira/browse/TINKERPOP-2296?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17093367#comment-17093367 ]
Stephen Mallette commented on TINKERPOP-2296: --------------------------------------------- In some ways it makes sense to place this kind of processing on the server, but we'd need to analyze bytecode to do that because waiting for an {{OptionsStrategy}} instance to look at would mean that the timeout period would have already started as request timeouts are include both the bytecode translation time and the traversal execution time. I suppose we could figure out a way to make that work but for some reason it doesn't sound like the right way to do it. The "right" way seems like we should be considering some form of {{TraversalStrategy}} application in GLVs which might help us understand more about full VM implementation in GLVs. Or...we give some thought to an old idea of implementing some form of bytecode pre-processing for GLVs. The thought with pre-processing is almost like the way in which {{TraversalStrategies}} work but operates at the bytecode level rather than at the traversal level. The advantage of bytecode strategies is that they fit in nicely with existing GLV infrastructure, but I'm hesitant to say that they represent the right way to do this as I'd wonder what additional use cases they would fill. I guess they give clients a generalized way to transform bytecode that would go to every provider, but I suppose I'd want to brainstorm what use that really provides besides support for this specific issue. Perhaps all of this is overkill and we should simply capture the use of {{with()}} for this case and convert it into request options.... > Per query timeout not working from Python > ----------------------------------------- > > Key: TINKERPOP-2296 > URL: https://issues.apache.org/jira/browse/TINKERPOP-2296 > Project: TinkerPop > Issue Type: Bug > Components: python, server > Affects Versions: 3.4.3 > Environment: Gremlin Server 3.4.3 and GremlinPython latest > Reporter: Kelvin R. Lawrence > Priority: Major > > I had a discussion with [~spmallette] about some problems I have been running > into trying to get per query timeouts to work using the Python GLV client. As > best as I can tell the timeout setting just gets ignored. The query executes > to completion taking as many seconds as needed. Stephen asked for a Jira so > writing this up here. > Using the air-routes data set this query can take a few seconds so should > definitely time out at 200ms. Using the Java client the same query works > although I had an exception when using the Binary serializer but it worked > when using GraphSON. I don't know yet if that is relevant to this issue. > > {{paths = (g.V().with_('scriptEvaluationTimeout', 200).}} > {{ has('airport', 'code', 'AUS').}} > {{ repeat(__.out('route').simplePath()).}} > {{ until(__.has('code', 'AGR')).}} > {{ path().by('code').}} > {{ limit(10).}} > {{ toList())}} > > {{As a sidenote it would be nice if the Python client had an equivalent of > the Java Tokens class so that constant variable names rather than strings > could be used for the 'scriptEvaluationTimeout' part.}} -- This message was sent by Atlassian Jira (v8.3.4#803005)