nicknezis commented on code in PR #3830:
URL: https://github.com/apache/incubator-heron/pull/3830#discussion_r895221023


##########
heron/tools/tracker/src/python/tracker.py:
##########
@@ -64,17 +66,18 @@ def sync_topologies(self) -> None:
     def on_topologies_watch(state_manager: StateManager, topologies: 
List[str]) -> None:
       """watch topologies"""
       topologies = set(topologies)
-      Log.info("State watch triggered for topologies.")
-      Log.debug("Topologies: %s", topologies)
-      cached_names = {t.name for t in 
self.get_stmgr_topologies(state_manager.name)}
-      Log.debug("Existing topologies: %s", cached_names)
-      for name in cached_names - topologies:
-        Log.info("Removing topology: %s in rootpath: %s",
-                 name, state_manager.rootpath)
-        self.remove_topology(name, state_manager.name)
-
-      for name in topologies - cached_names:
-        self.add_new_topology(state_manager, name)
+      Log.info(f"State watch triggered for topologies of 
{state_manager.name}.")
+      Log.debug(f"Received topologies: {state_manager.name}, {topologies}")

Review Comment:
   Correct. I don't think this was a style check issue. When I did the 
conversion to f-string during the Python upgrade, I left some of these Log 
statements in the (format_str, &args) format because it is more efficient. 
Doing the f-string first and then passing into a log statement that might not 
render is wasted effort. The Log statement will only do the string 
interpolation if the log statement needs to be rendered. Because of this, I 
felt it was better to keep it in the original form.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to