Repository: tinkerpop
Updated Branches:
  refs/heads/TINKERPOP-1726 10ab33410 -> 6cb73c70b


TINKERPOP-1726 Renamed settings to idleConnectionTimeout and keepAliveInterval


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

Branch: refs/heads/TINKERPOP-1726
Commit: 6cb73c70bec0f867a3b6b60a674da73b0f4ea176
Parents: 10ab334
Author: Stephen Mallette <sp...@genoprime.com>
Authored: Tue Feb 20 08:22:04 2018 -0500
Committer: Stephen Mallette <sp...@genoprime.com>
Committed: Tue Feb 20 08:22:04 2018 -0500

----------------------------------------------------------------------
 docs/src/reference/gremlin-applications.asciidoc          |  4 ++--
 docs/src/upgrade/release-3.2.x-incubating.asciidoc        | 10 +++++-----
 .../tinkerpop/gremlin/server/AbstractChannelizer.java     |  2 +-
 .../org/apache/tinkerpop/gremlin/server/Settings.java     | 10 +++++-----
 .../gremlin/server/handler/OpSelectorHandler.java         |  4 ++--
 .../gremlin/server/GremlinServerIntegrateTest.java        |  2 +-
 6 files changed, 16 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/docs/src/reference/gremlin-applications.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/reference/gremlin-applications.asciidoc 
b/docs/src/reference/gremlin-applications.asciidoc
index 2413bdb..e84961c 100644
--- a/docs/src/reference/gremlin-applications.asciidoc
+++ b/docs/src/reference/gremlin-applications.asciidoc
@@ -1073,8 +1073,8 @@ The following table describes the various configuration 
options that Gremlin Ser
 |graphs |A `Map` of `Graph` configuration files where the key of the `Map` 
becomes the name to which the `Graph` will be bound and the value is the file 
name of a `Graph` configuration file. |_none_
 |gremlinPool |The number of "Gremlin" threads available to execute actual 
scripts in a `ScriptEngine`. This pool represents the workers available to 
handle blocking operations in Gremlin Server. When set to `0`, Gremlin Server 
will use the value provided by `Runtime.availableProcessors()`. |0
 |host |The name of the host to bind the server to. |localhost
-|idleReadLimit |Time in milliseconds that the server will allow a channel to 
not receive requests from a client before it automatically closes. If enabled, 
the value provided should typically exceed the amount of time given to 
`idleWriteLimit`. Set this value to `0` to disable this feature. |0
-|idleWriteLimit |Time in milliseconds that the server will allow a channel to 
not send responses to a client before it sends a "ping" to see if it is still 
present. If it is present, the client should respond with a "pong" which will 
thus reset the {@link #idleReadLimit} and keep the channel open. If enabled, 
this number should be smaller than the value provided to the `idleReadLimit`. 
Set this value to `0` to disable this feature. |0
+|idleConnectionTimeout |Time in milliseconds that the server will allow a 
channel to not receive requests from a client before it automatically closes. 
If enabled, the value provided should typically exceed the amount of time given 
to `idleWriteLimit`. Set this value to `0` to disable this feature. |0
+|keepAliveInterval |Time in milliseconds that the server will allow a channel 
to not send responses to a client before it sends a "ping" to see if it is 
still present. If it is present, the client should respond with a "pong" which 
will thus reset the `#idleConnectionTimeout` and keep the channel open. If 
enabled, this number should be smaller than the value provided to the 
`idleConnectionTimeout`. Set this value to `0` to disable this feature. |0
 |maxAccumulationBufferComponents |Maximum number of request components that 
can be aggregated for a message. |1024
 |maxChunkSize |The maximum length of the content or each chunk.  If the 
content length exceeds this value, the transfer encoding of the decoded request 
will be converted to 'chunked' and the content will be split into multiple 
`HttpContent` objects.  If the transfer encoding of the HTTP request is 
'chunked' already, each chunk will be split into smaller chunks if the length 
of the chunk exceeds this value. |8192
 |maxContentLength |The maximum length of the aggregated content for a message. 
 Works in concert with `maxChunkSize` where chunked requests are accumulated 
back into a single message.  A request exceeding this size will return a `413 - 
Request Entity Too Large` status code.  A response exceeding this size will 
raise an internal exception. |65536

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/docs/src/upgrade/release-3.2.x-incubating.asciidoc
----------------------------------------------------------------------
diff --git a/docs/src/upgrade/release-3.2.x-incubating.asciidoc 
b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
index f623127..7d2a80c 100644
--- a/docs/src/upgrade/release-3.2.x-incubating.asciidoc
+++ b/docs/src/upgrade/release-3.2.x-incubating.asciidoc
@@ -31,11 +31,11 @@ Please see the 
link:https://github.com/apache/tinkerpop/blob/3.2.8/CHANGELOG.asc
 
 ==== Improved Connection Monitoring
 
-Gremlin Server now has two new settings: `idleReadLimit` and `idleWriteLimit`. 
The `idleWriteLimit` tells Gremlin
-Server how long it should wait between writes to a client before it issues a 
"ping" to that client to see if it is
-still present. The `idleReadLimit` represents how long Gremlin Server should 
wait between requests from a client before
-it closes the connection on the server side. By default, these two 
configurations are set to zero, meaning that they
-are both disabled.
+Gremlin Server now has two new settings: `idleConnectionTimeout` and 
`keepAliveInterval`. The `keepAliveInterval` tells
+Gremlin Server how long it should wait between writes to a client before it 
issues a "ping" to that client to see if
+it is still present. The `idleConnectionTimeout` represents how long Gremlin 
Server should wait between requests from
+a client before it closes the connection on the server side. By default, these 
two configurations are set to zero,
+meaning that they are both disabled.
 
 This change should help to alleviate issues where connections are left open on 
the server longer than they should be
 by clients that might mysteriously disappear without properly closing their 
connections.

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
index 0bc4e00..bfb9660 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/AbstractChannelizer.java
@@ -154,7 +154,7 @@ public abstract class AbstractChannelizer extends 
ChannelInitializer<SocketChann
         // checks for no activity on a channel and triggers an event that is 
consumed by the OpSelectorHandler
         // and either closes the connection or sends a ping to see if the 
client is still alive
         if (supportsIdleMonitor())
-            pipeline.addLast(new IdleStateHandler((int) 
(settings.idleReadLimit / 1000), (int) (settings.idleWriteLimit / 1000),0));
+            pipeline.addLast(new IdleStateHandler((int) 
(settings.idleConnectionTimeout / 1000), (int) (settings.keepAliveInterval / 
1000),0));
 
         // the implementation provides the method by which Gremlin Server will 
process requests.  the end of the
         // pipeline must decode to an incoming RequestMessage instances and 
encode to a outgoing ResponseMessage

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
index 75466ca..ec2eaf9 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/Settings.java
@@ -166,17 +166,17 @@ public class Settings {
     /**
      * Time in milliseconds that the server will allow a channel to not 
receive requests from a client before it
      * automatically closes. If enabled, the value provided should typically 
exceed the amount of time given to
-     * {@link #idleWriteLimit}. Set this value to 0 to disable this feature.
+     * {@link #keepAliveInterval}. Set this value to 0 to disable this feature.
      */
-    public long idleReadLimit = 0;
+    public long idleConnectionTimeout = 0;
 
     /**
      * Time in milliseconds that the server will allow a channel to not send 
responses to a client before it sends
      * a "ping" to see if it is still present. If it is present, the client 
should respond with a "pong" which will
-     * thus reset the {@link #idleReadLimit} and keep the channel open. If 
enabled, this number should be smaller than
-     * the value provided to the {@link #idleReadLimit}. Set this value to 0 
to disable this feature.
+     * thus reset the {@link #idleConnectionTimeout} and keep the channel 
open. If enabled, this number should be smaller than
+     * the value provided to the {@link #idleConnectionTimeout}. Set this 
value to 0 to disable this feature.
      */
-    public long idleWriteLimit = 0;
+    public long keepAliveInterval = 0;
 
     /**
      * If set to {@code true} the {@code aliases} option is required on 
requests and Gremlin Server will use that

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
index 8bb9c44..de65bb9 100644
--- 
a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
+++ 
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/handler/OpSelectorHandler.java
@@ -126,10 +126,10 @@ public class OpSelectorHandler extends 
MessageToMessageDecoder<RequestMessage> {
             // periodically ping the server, but coming from this direction 
allows the server to kill channels that
             // have dead clients on the other end
             if (e.state() == IdleState.READER_IDLE) {
-                logger.info("Closing channel - client is disconnected after 
idle period of " + settings.idleReadLimit + " " + ctx.channel());
+                logger.info("Closing channel - client is disconnected after 
idle period of " + settings.idleConnectionTimeout + " " + ctx.channel());
                 ctx.close();
             } else if (e.state() == IdleState.WRITER_IDLE) {
-                logger.info("Checking channel - sending ping to client after 
idle period of " + settings.idleWriteLimit + " " + ctx.channel());
+                logger.info("Checking channel - sending ping to client after 
idle period of " + settings.keepAliveInterval + " " + ctx.channel());
                 ctx.writeAndFlush(channelizer.createIdleDetectionMessage());
             }
         }

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/6cb73c70/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
----------------------------------------------------------------------
diff --git 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
index 55912e1..033c847 100644
--- 
a/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
+++ 
b/gremlin-server/src/test/java/org/apache/tinkerpop/gremlin/server/GremlinServerIntegrateTest.java
@@ -251,7 +251,7 @@ public class GremlinServerIntegrateTest extends 
AbstractGremlinServerIntegration
                 settings.scriptEvaluationTimeout = 500;
                 break;
             case "shouldPingChannelIfClientDies":
-                settings.idleWriteLimit = 1000;
+                settings.keepAliveInterval = 1000;
                 break;
         }
 

Reply via email to