[
https://issues.apache.org/jira/browse/TINKERPOP-1644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15905351#comment-15905351
]
ASF GitHub Bot commented on TINKERPOP-1644:
-------------------------------------------
GitHub user spmallette opened a pull request:
https://github.com/apache/tinkerpop/pull/570
TINKERPOP-1644 Improve script compilation process and include metrics
https://issues.apache.org/jira/browse/TINKERPOP-1644
This PR was started on #567 which was submitted by @BrynCooke. I've made
some basic modifications and included various metrics about compilation that
will be helpful in debugging things. Those metrics are reported up through
Gremlin Server through the standard metric reporting system.
Builds to success with `docker/build.sh -t -i -n`.
VOTE +1
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/apache/tinkerpop TINKERPOP-1644
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/tinkerpop/pull/570.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #570
----
commit 13c93cabac51112a73f592e0fba12e515f643522
Author: BrynCooke <[email protected]>
Date: 2017-03-02T19:07:28Z
TINKERPOP-1644 Improve script compilation syncronisation
Script compilation is synchronised.
Script compilation times are placed in to logs.
Failed scripts will not be recompiled.
Scripts that take over 5 seconds to compile are logged as a warning.
commit deb68280d986b086120d56a73659b1869c07a475
Author: BrynCooke <[email protected]>
Date: 2017-03-07T16:54:58Z
TINKERPOP-1644
Use future instead of maintaining a separate map of failures.
commit 18778e405981523355319fa56bd04fd6cc07b845
Author: BrynCooke <[email protected]>
Date: 2017-03-08T12:24:46Z
TINKERPOP-1644
Use Caffeine cache
commit 17a72e0e1db6fe52d3a0821ef2bfae1eb39be856
Author: BrynCooke <[email protected]>
Date: 2017-03-08T13:23:30Z
TINKERPOP-1644
Fix exception handling.
commit 1df71c81e032daa9c9db6f626d99c39b37d434ce
Author: BrynCooke <[email protected]>
Date: 2017-03-08T13:26:31Z
TINKERPOP-1644
Fix exception handling.
commit 608f024f7bb83eb168a6aa637d46ee0650674903
Author: Stephen Mallette <[email protected]>
Date: 2017-03-08T18:31:52Z
TINKERPOP-1644 Remove gremlin-server caffeine dependency
Caffeine is now down in gremlin-groovy.
commit de1d58ab33c3121e9bafb5e4908f3e0d76c8e26e
Author: Stephen Mallette <[email protected]>
Date: 2017-03-08T18:37:42Z
TINKERPOP-1644 Minor code format updates
commit 4bdeac4b796b38fb14d1be763e03cc837b57d3d7
Author: Stephen Mallette <[email protected]>
Date: 2017-03-08T21:13:06Z
TINKERPOP-1644 Provided configuration options for GremlinGroovyScriptEngine
Introduced new customizers to pass in configuration options to the
GremlinGroovyScriptEngine.
commit b29ba12109e7e88bc3465d08f6177e5ded17ca59
Author: Stephen Mallette <[email protected]>
Date: 2017-03-08T21:15:27Z
TINKERPOP-1644 Updated changelog
commit a06072b0502f9b42fee4c68dba554b4991406c36
Author: Stephen Mallette <[email protected]>
Date: 2017-03-08T21:17:40Z
TINKERPOP-1644 Made the "counter" in GremlinGroovyScriptEngine static
It seems that this field should be static and shared across all instances
as the script name seems to share space with other GroovyClassLoaders. Not sure
what would happen in the case of collision, but there doesn't seem to be much
harm in ensuring better uniqueness. This counter wasn't used for tracking the
number of scripts actually processed or anything so it should be ok to make
this change without fear of breaking anything.
commit 8ffa5af6ff56933c1955e88e8aa42c06cb69162b
Author: Stephen Mallette <[email protected]>
Date: 2017-03-09T15:30:17Z
TINKERPOP-1644 Added metrics to GremlinGroovyScriptEngine
commit b689deb1dd1a0c745966a1ed5f8e7e3b2d543af2
Author: Stephen Mallette <[email protected]>
Date: 2017-03-09T17:25:35Z
TINKERPOP-1644 Exposed GremlinScriptEngine metrics in Gremlin Server
commit 9eb248ef0f0f29e8cf11cd5391ef8d993e37f7af
Author: Stephen Mallette <[email protected]>
Date: 2017-03-09T18:15:04Z
TINKERPOP-1644 Renamed metrics for GremlinScriptEngine instances.
Included the name of the GremlinScriptEngine and prefixed each metric with
GremlinServer class name to be consistent with other metrics.
commit 37976526f1eac9fd06858f962f979aa98d3e5346
Author: Stephen Mallette <[email protected]>
Date: 2017-03-09T18:35:44Z
TINKERPOP-1644 Docs for new metrics in Gremlin Server
commit 33db1a3893c91a2dde100c8a0289312d4550503c
Author: Stephen Mallette <[email protected]>
Date: 2017-03-09T19:51:36Z
TINKERPOP-1644 Cleaned up a bad import
----
> Improve script compilation process and include metrics
> ------------------------------------------------------
>
> Key: TINKERPOP-1644
> URL: https://issues.apache.org/jira/browse/TINKERPOP-1644
> Project: TinkerPop
> Issue Type: Improvement
> Components: groovy
> Affects Versions: 3.2.4
> Reporter: Bryn Cooke
> Assignee: stephen mallette
>
> Currently there is no synchronisation around script compilation. This means
> that if a particularly heavy script is in use, many threads may end up
> compiling the same script.
> It would seem like a good idea to have some some sort of synchronisation to
> prevent ever getting to this stage.
> In addition, there will be cases where users will repeatedly submit broken
> scripts to the server. In this case it is useful to log the error the first
> time the script compilation is attempted and then cache the error for
> subsequent runs.
> Finally I have found some scripts take in excess of 30 seconds to compile. To
> aid performance debugging the script compilation times should be included in
> the logs.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)