I believe there is room for improvement here because otherwise you would have to wait until all OXPs send their topology again to update TEManager.
On the other hand, if you try to get the topology right after restating the controller, that works fine because the get topology endpoint reads directly from DB:
Currently the SDX-Controller initialize the TEManager with null topology:
https://github.com/atlanticwave-sdx/sdx-controller/blob/24a592dc38bf59347cd39132e179f5687dbe6426/sdx_controller/__init__.py#L67
I believe there is room for improvement here because otherwise you would have to wait until all OXPs send their topology again to update TEManager.
On the other hand, if you try to get the topology right after restating the controller, that works fine because the get topology endpoint reads directly from DB:
https://github.com/atlanticwave-sdx/sdx-controller/blob/24a592dc38bf59347cd39132e179f5687dbe6426/sdx_controller/controllers/topology_controller.py#L19