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


##########
src/main/java/org/apache/sling/discovery/base/commons/BaseDiscoveryService.java:
##########
@@ -93,7 +99,37 @@ public TopologyView getTopology() {
                 .listInstances(localClusterView);
         topology.addInstances(attachedInstances);
 
+        // Check if topology changes should be delayed
+        if (topologyReadinessHandler != null && 
topologyReadinessHandler.shouldDelayTopologyChange(null)) {
+            logger.debug("getTopology: topology changes are delayed, returning 
old view");
+            return oldView;
+        }
+
         return topology;
     }
 
+    protected void handleTopologyEvent(TopologyEvent event) {

Review Comment:
   Done. Moved to TopologyReadinessHandler



-- 
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