pzampino commented on code in PR #929:
URL: https://github.com/apache/knox/pull/929#discussion_r1725022591


##########
gateway-server/src/main/java/org/apache/knox/gateway/GatewayServer.java:
##########
@@ -962,10 +985,32 @@ private void processApplicationPathAliases(File warDir, 
Topology topology) {
     });
   }
 
+  private void addInactiveTopology(final String topologyName) {
+    synchronized (inactiveTopologies) {
+      inactiveTopologies.add(topologyName);
+    }
+  }
+
+  private void removeInactiveTopology(final String topologyName) {
+    synchronized (inactiveTopologies) {
+      inactiveTopologies.remove(topologyName);
+    }
+  }
+
+  private boolean isInactiveTopology(final String topologyName) {
+    boolean result = false;
+    synchronized (inactiveTopologies) {
+      result = inactiveTopologies.contains(topologyName);
+    }
+    return result;
+  }
+
   private synchronized void internalDeactivateTopology( Topology topology ) {

Review Comment:
   I'm not convinced that the state should be part of the TopologyService. The 
TopologyService has more to do with handling topology artifacts than actual 
deployment/activation. It seems to me that the responsibility for 
deployment/activation is handled by GatewayServer. I think managing this active 
state in the TopologyService would broaden the window of time during which 
clients would unnecessarily receive a 503 response where they would have 
previously not received a 404 response. The 404 responses would not occur until 
the app was actually deactivated.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@knox.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to