tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [1/2] tinkerpop git commit: TINKERPOP-1778 Removed timedInterrupt from documentation
Date Mon, 18 Jun 2018 13:44:14 GMT
Repository: tinkerpop
Updated Branches:
  refs/heads/master e1b38209c -> 5441db8ea


TINKERPOP-1778 Removed timedInterrupt from documentation

It competes with scriptEvaluationTimeout so really not necessary. CTR


Project: http://git-wip-us.apache.org/repos/asf/tinkerpop/repo
Commit: http://git-wip-us.apache.org/repos/asf/tinkerpop/commit/7b6ba39c
Tree: http://git-wip-us.apache.org/repos/asf/tinkerpop/tree/7b6ba39c
Diff: http://git-wip-us.apache.org/repos/asf/tinkerpop/diff/7b6ba39c

Branch: refs/heads/master
Commit: 7b6ba39c16508c5cc57779b08d22cca3f6ee297d
Parents: c790459
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Mon Jun 18 09:43:25 2018 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Mon Jun 18 09:43:25 2018 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                               |  1 +
 docs/src/reference/gremlin-applications.asciidoc | 17 ++++++++---------
 docs/src/upgrade/release-3.3.x.asciidoc          |  8 ++++++++
 gremlin-server/conf/gremlin-server-modern.yaml   |  1 +
 4 files changed, 18 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b6ba39c/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index fce2153..79a4327 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -25,6 +25,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 
 This release also includes changes from <<release-3-2-10, 3.2.10>>.
 
+* Removed `timedInterrupt` from documentation as a way to timeout.
 * Deprecated `Order` for `incr` and `decr` in favor of `asc` and `desc`.
 
 [[release-3-3-3]]

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b6ba39c/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc b/docs/src/reference/gremlin-applications.asciidoc
index 9e10486..21fc47f 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1487,7 +1487,7 @@ scriptEngines: {
                org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample.groovy]}}}}
 ----
 
-This configuration can be expaded to include a the `GroovyCompilerGremlinPlugin`:
+This configuration can be expanded to include a the `GroovyCompilerGremlinPlugin`:
 
 [source,yaml]
 ----
@@ -1497,18 +1497,18 @@ scriptEngines: {
                org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin:
{}
                org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math],
methodImports: [java.lang.Math#*]},
                org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample-secure.groovy]},
-               org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin: {timedInterrupt:
10000}}}}
+               org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin: {enableThreadInterrupt:
true}}}}
 ----
 
-This configuration sets up the script engine with to ensure that loops (like `while`) can
only execute for `10000`
-milliseconds.  With this configuration in place, a remote execution as follows, now times
out rather than consuming
-the thread continuously:
+This configuration sets up the script engine with to ensure that loops (like `while`) will
respect interrupt requests.
+With this configuration in place, a remote execution as follows, now times out rather than
consuming the thread
+continuously:
 
 [source,groovy]
 gremlin> :remote connect tinkerpop.server conf/remote.yaml
 ==>Configured localhost/127.0.0.1:8182
 gremlin> :> while(true) { }
-Execution timed out after 10000 units. Start time: Fri Jul 24 11:04:52 EDT 2015
+==>Script evaluation exceeded the configured 'scriptEvaluationTimeout' threshold of 30000
ms or evaluation was otherwise cancelled directly for request [while(true) {}]
 
 The `GroovyCompilerGremlinPlugin` has a number of configuration options:
 
@@ -1517,10 +1517,9 @@ The `GroovyCompilerGremlinPlugin` has a number of configuration options:
 |Customizer |Description
 |`compilation` |Allows for three configurations: `COMPILE_STATIC`, `TYPE_CHECKED` or `NONE`
(default). When configured with `COMPILE_STATIC` or `TYPE_CHECKED` it applies `CompileStatic`
or `TypeChecked` annotations (respectively) to incoming scripts thus removing dynamic dispatch.
More information about static compilation can be found link:http://docs.groovy-lang.org/latest/html/documentation/#_static_compilation[here]
and additional information on `TypeChecked` usage can be found link:http://docs.groovy-lang.org/latest/html/documentation/#_the_code_typechecked_code_annotation[here].
 |`compilerConfigurationOptions` |Allows configuration of the Groovy `CompilerConfiguration`
object by taking a `Map` of key/value pairs where the "key" is a property to set on the `CompilerConfiguration`.
-|`enableThreadInterrupt` |Injects checks for thread interruption, thus allowing the thread
to potentially respect calls to `Thread.interrupt()`
+|`enableThreadInterrupt` |Injects checks for thread interruption, thus allowing the script
to potentially respect calls to `Thread.interrupt()`
 |`expectedCompilationTime` |The amount of time in milliseconds a script is allowed to compile
before a warning message is sent to the logs.
 |`extensions` | This setting is for use when `compilation` is configured with `COMPILE_STATIC`
or `TYPE_CHECKED` and accepts a comma separated list of link:http://docs.groovy-lang.org/latest/html/documentation/#Typecheckingextensions-Workingwithextensions[type
checking extensions] that can have the effect of securing calls to various methods.
-|`timedInterrupt` |Injects checks into loops to interrupt them if they exceed the configured
timeout in milliseconds.
 |=========================================================
 
 NOTE: Consult the latest link:http://docs.groovy-lang.org/latest/html/documentation/#_typing[Groovy
Documentation]
@@ -1535,7 +1534,7 @@ scriptEngines: {
   gremlin-groovy: {
     plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
                org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin:
{}
-               org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin: {enableThreadInterrupt:
true, timedInterrupt: 10000, compilation: COMPILE_STATIC, extensions: org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.SimpleSandboxExtension},
+               org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin: {enableThreadInterrupt:
true, compilation: COMPILE_STATIC, extensions: org.apache.tinkerpop.gremlin.groovy.jsr223.customizer.SimpleSandboxExtension},
                org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math],
methodImports: [java.lang.Math#*]},
                org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/empty-sample-secure.groovy]}}}}
 ----

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b6ba39c/docs/src/upgrade/release-3.3.x.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.3.x.asciidoc b/docs/src/upgrade/release-3.3.x.asciidoc
index d0f3a23..a18075f 100644
--- a/docs/src/upgrade/release-3.3.x.asciidoc
+++ b/docs/src/upgrade/release-3.3.x.asciidoc
@@ -38,6 +38,14 @@ that `incr` and `decr` have not been removed - just deprecated and thus
marked f
 
 See: link:https://issues.apache.org/jira/browse/TINKERPOP-1956[TINKERPOP-1956]
 
+==== TimedInterrupt
+
+In Gremlin Server, it is best not to use the {{timedInterrupt}} option on {{GroovyCompilerGremlinPlugin}}
because it
+can compete with the {{scriptEvaluationTimeout}} setting and produce a different error path.
Simply rely on
+{{scriptEvaluationTimeout}} as it covers both script evaluation time and result iteration
time.
+
+See: link:https://issues.apache.org/jira/browse/TINKERPOP-1778[TINKERPOP-1778]
+
 == TinkerPop 3.3.3
 
 *Release Date: May 8, 2018*

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/7b6ba39c/gremlin-server/conf/gremlin-server-modern.yaml
----------------------------------------------------------------------
diff --git a/gremlin-server/conf/gremlin-server-modern.yaml b/gremlin-server/conf/gremlin-server-modern.yaml
index 63c9d0d..6cb8014 100644
--- a/gremlin-server/conf/gremlin-server-modern.yaml
+++ b/gremlin-server/conf/gremlin-server-modern.yaml
@@ -24,6 +24,7 @@ scriptEngines: {
   gremlin-groovy: {
     plugins: { org.apache.tinkerpop.gremlin.server.jsr223.GremlinServerGremlinPlugin: {},
                org.apache.tinkerpop.gremlin.tinkergraph.jsr223.TinkerGraphGremlinPlugin:
{},
+               org.apache.tinkerpop.gremlin.groovy.jsr223.GroovyCompilerGremlinPlugin: {enableThreadInterrupt:
true},
                org.apache.tinkerpop.gremlin.jsr223.ImportGremlinPlugin: {classImports: [java.lang.Math],
methodImports: [java.lang.Math#*]},
                org.apache.tinkerpop.gremlin.jsr223.ScriptFileGremlinPlugin: {files: [scripts/generate-modern.groovy]}}}}
 serializers:


Mime
View raw message