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


##########
heron/tools/tracker/src/python/tracker.py:
##########
@@ -114,37 +121,37 @@ def get_stmgr_topologies(self, name: str) -> List[Any]:
     """
     return [t for t in self.topologies if t.state_manager_name == name]
 
-  def add_new_topology(self, state_manager, topology_name: str) -> None:
+  def add_new_topology(self, state_manager: StateManager, topology_name: str) 
-> None:
     """
     Adds a topology in the local cache, and sets a watch
     on any changes on the topology.
     """
     topology = Topology(topology_name, state_manager.name, self.config)
-    Log.info("Adding new topology: %s, state_manager: %s",
-             topology_name, state_manager.name)
-    # populate the cache before making it addressable in the topologies to
-    # avoid races due to concurrent execution
-    self.topologies.append(topology)
-
-    # Set watches on the pplan, execution_state, tmanager and 
scheduler_location.
-    state_manager.get_pplan(topology_name, topology.set_physical_plan)
-    state_manager.get_packing_plan(topology_name, topology.set_packing_plan)
-    state_manager.get_execution_state(topology_name, 
topology.set_execution_state)
-    state_manager.get_tmanager(topology_name, topology.set_tmanager)
-    state_manager.get_scheduler_location(topology_name, 
topology.set_scheduler_location)
+    with self.lock:

Review Comment:
   ???



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