tinkerpop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From spmalle...@apache.org
Subject [23/31] tinkerpop git commit: Fully shutdown metrics services in Gremlin Server on shutdown CTR
Date Mon, 31 Oct 2016 17:25:39 GMT
Fully shutdown metrics services in Gremlin Server on shutdown CTR


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

Branch: refs/heads/TINKERPOP-932
Commit: 30c2600bff074a7053cecab90baeccb60b087456
Parents: bfda550
Author: Stephen Mallette <spmva@genoprime.com>
Authored: Fri Oct 28 12:00:59 2016 -0400
Committer: Stephen Mallette <spmva@genoprime.com>
Committed: Fri Oct 28 12:00:59 2016 -0400

----------------------------------------------------------------------
 CHANGELOG.asciidoc                                              | 1 +
 .../java/org/apache/tinkerpop/gremlin/server/GremlinServer.java | 5 +++++
 2 files changed, 6 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/30c2600b/CHANGELOG.asciidoc
----------------------------------------------------------------------
diff --git a/CHANGELOG.asciidoc b/CHANGELOG.asciidoc
index 52ae70d..9685f20 100644
--- a/CHANGELOG.asciidoc
+++ b/CHANGELOG.asciidoc
@@ -26,6 +26,7 @@ image::https://raw.githubusercontent.com/apache/tinkerpop/master/docs/static/ima
 TinkerPop 3.1.6 (Release Date: NOT OFFICIALLY RELEASED YET)
 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
+* Fully shutdown metrics services in Gremlin Server on shutdown.
 * Deprecated `tryRandomCommit()` in `AbstractGremlinTest` - the annotation was never added
in 3.1.1, and was only deprecated via javadoc.
 * Minor fixes to various test feature requirements in `gremlin-test`.
 

http://git-wip-us.apache.org/repos/asf/tinkerpop/blob/30c2600b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
----------------------------------------------------------------------
diff --git a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
index 4d76e30..e4a7162 100644
--- a/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
+++ b/gremlin-server/src/main/java/org/apache/tinkerpop/gremlin/server/GremlinServer.java
@@ -313,6 +313,11 @@ public class GremlinServer {
                 }
             });
 
+            // kills reporter threads. this is a last bit of cleanup that can be done. typically,
the jvm is headed
+            // for shutdown which would obviously kill the reporters, but when it isn't they
just keep reporting.
+            // removing them all will silent them up and release the appropriate resources.
+            MetricManager.INSTANCE.removeAllReporters();
+
             logger.info("Gremlin Server - shutdown complete");
             serverStopped.complete(null);
         }, SERVER_THREAD_PREFIX + "stop").start();


Mime
View raw message