From fd0955944b8187f0953cb266800db3ad94e388b4 Mon Sep 17 00:00:00 2001 From: Sam Bishop Date: Fri, 26 Apr 2024 10:48:36 -0400 Subject: [PATCH 1/4] move ResourceWatcher to shutdown after MetricManager --- src/main/java/emissary/server/EmissaryServer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/emissary/server/EmissaryServer.java b/src/main/java/emissary/server/EmissaryServer.java index 96589365b7..24d3c46b62 100644 --- a/src/main/java/emissary/server/EmissaryServer.java +++ b/src/main/java/emissary/server/EmissaryServer.java @@ -366,6 +366,12 @@ public static void stopServer(final String name, final boolean force, final bool } LOG.info("Done stopping all places"); + try { + MetricsManager.lookup().shutdown(); + } catch (Exception ex) { + LOG.warn("No metrics manager available"); + } + // Print the stats try { ResourceWatcher rw = ResourceWatcher.lookup(); @@ -375,12 +381,6 @@ public static void stopServer(final String name, final boolean force, final bool LOG.warn("No resource statistics available"); } - try { - MetricsManager.lookup().shutdown(); - } catch (Exception ex) { - LOG.warn("No metrics manager available"); - } - SPILoader.unload(); RollManager.shutdown(); From b635b51d85e3edaef921119ceaa5688380cd0a2a Mon Sep 17 00:00:00 2001 From: Sam Bishop Date: Fri, 26 Apr 2024 11:24:26 -0400 Subject: [PATCH 2/4] move RollManager also to shutdown before ResourceWatcher --- src/main/java/emissary/server/EmissaryServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/emissary/server/EmissaryServer.java b/src/main/java/emissary/server/EmissaryServer.java index 24d3c46b62..04fc0833ef 100644 --- a/src/main/java/emissary/server/EmissaryServer.java +++ b/src/main/java/emissary/server/EmissaryServer.java @@ -372,6 +372,8 @@ public static void stopServer(final String name, final boolean force, final bool LOG.warn("No metrics manager available"); } + RollManager.shutdown(); + // Print the stats try { ResourceWatcher rw = ResourceWatcher.lookup(); @@ -383,8 +385,6 @@ public static void stopServer(final String name, final boolean force, final bool SPILoader.unload(); - RollManager.shutdown(); - LOG.info("Done stopping all services"); // thread dump now From 63b4bd4bbdb681ed2ae256d6e31bf6164e71ef40 Mon Sep 17 00:00:00 2001 From: Sam Bishop Date: Mon, 29 Apr 2024 15:58:21 -0400 Subject: [PATCH 3/4] Move RollManager to shutdown prior to MetricsManager --- src/main/java/emissary/server/EmissaryServer.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/emissary/server/EmissaryServer.java b/src/main/java/emissary/server/EmissaryServer.java index 04fc0833ef..dd1c379fb8 100644 --- a/src/main/java/emissary/server/EmissaryServer.java +++ b/src/main/java/emissary/server/EmissaryServer.java @@ -366,14 +366,14 @@ public static void stopServer(final String name, final boolean force, final bool } LOG.info("Done stopping all places"); + RollManager.shutdown(); + try { MetricsManager.lookup().shutdown(); } catch (Exception ex) { LOG.warn("No metrics manager available"); } - RollManager.shutdown(); - // Print the stats try { ResourceWatcher rw = ResourceWatcher.lookup(); From b1911ea99b5b5be3d9854d24f44fdffc329ab909 Mon Sep 17 00:00:00 2001 From: jpdahlke Date: Tue, 30 Apr 2024 19:21:24 -0400 Subject: [PATCH 4/4] restore MetricsManager shutdown location --- src/main/java/emissary/server/EmissaryServer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/main/java/emissary/server/EmissaryServer.java b/src/main/java/emissary/server/EmissaryServer.java index dd1c379fb8..a909550a4f 100644 --- a/src/main/java/emissary/server/EmissaryServer.java +++ b/src/main/java/emissary/server/EmissaryServer.java @@ -368,12 +368,6 @@ public static void stopServer(final String name, final boolean force, final bool RollManager.shutdown(); - try { - MetricsManager.lookup().shutdown(); - } catch (Exception ex) { - LOG.warn("No metrics manager available"); - } - // Print the stats try { ResourceWatcher rw = ResourceWatcher.lookup(); @@ -383,6 +377,12 @@ public static void stopServer(final String name, final boolean force, final bool LOG.warn("No resource statistics available"); } + try { + MetricsManager.lookup().shutdown(); + } catch (Exception ex) { + LOG.warn("No metrics manager available"); + } + SPILoader.unload(); LOG.info("Done stopping all services");