ionutzpi commented on code in PR #7: URL: https://github.com/apache/sling-org-apache-sling-discovery-commons/pull/7#discussion_r2073566146
########## src/main/java/org/apache/sling/discovery/commons/providers/base/ViewStateManagerImpl.java: ########## @@ -446,7 +450,20 @@ public void handleNewView(final BaseTopologyView newView) { handleNewViewNonDelayed(newView); } - boolean handleNewViewNonDelayed(final BaseTopologyView newView) { + protected boolean handleNewViewNonDelayed(final BaseTopologyView newView) { + // Check if topology changes should be delayed + if (topologyReadinessHandler != null && topologyReadinessHandler.shouldTriggerTopologyChanging()) { + if (previousView != null) { + if (previousView.isCurrent()) { + logger.info("handleNewViewNonDelayed: would trigger TOPOLOGY_CHANGING for current view"); + } + previousView.setNotCurrent(); + } + return true; + } + + handleChanging(); + Review Comment: I removed handleChanging call. I placed the check to topologyreadinesshandler in handleNewViewNonDelayed, there seemed to be the right place for me. -- 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