ionutzpi commented on code in PR #12:
URL: 
https://github.com/apache/sling-org-apache-sling-discovery-base/pull/12#discussion_r2066188554


##########
src/main/java/org/apache/sling/discovery/base/commons/BaseDiscoveryService.java:
##########
@@ -93,6 +97,18 @@ public TopologyView getTopology() {
                 .listInstances(localClusterView);
         topology.addInstances(attachedInstances);
 
+        // Check if topology changes should be delayed
+        if (topologyReadinessHandler != null && 
topologyReadinessHandler.shouldDelayTopologyChange()) {
+            if (topologyReadinessHandler.isShutdown()) {
+                // On shutdown, mark oldView as not current to trigger 
TOPOLOGY_CHANGING
+                if (oldView != null) {
+                    oldView.setNotCurrent();
+                }
+            }
+            logger.debug("getTopology: topology changes are delayed, returning 
old view");
+            return oldView;

Review Comment:
   Done. Calling setNotCurrent for both cases.



-- 
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...@sling.apache.org

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

Reply via email to