Bug report
When two or more gateway plugins publish an entity with the same id (typically an area that several plugins use
by default), the gateway logs an ownership transfer warning on every entity refresh, for as long as it runs.
Steps to reproduce
- Load two or more plugins that publish an area with the same id.
- Start the gateway and let it refresh its entities (a plugin's change notification or the periodic backstop).
- Watch the gateway log.
Expected behavior
The conflict is reported once. The entity keeps a stable, documented owner.
Actual behavior
Each refresh registers the plugins in load order and hands the id from one plugin to the next, and every
hand-over logs:
[WARN] [plugin_manager]: Entity 'shared_area' ownership transferred from plugin 'a' to 'b'
With four plugins sharing one area that is four warnings per refresh, about 11,000 lines a day at the default
backstop interval, while nothing about the entity changes. The owner at the end of each refresh is always the
plugin registered last, which is also the plugin whose copy the entity cache serves, so the ownership itself is
consistent. Only the log is wrong.
Environment
- ros2_medkit version: main at 7b28433
- ROS 2 distro: Jazzy
- OS: Ubuntu 24.04 (docker)
Additional information
The warning comes from PluginManager::register_entity_ownership
(src/ros2_medkit_gateway/src/plugins/plugin_manager.cpp), which warns whenever the owner of an id changes,
including the transient changes inside one refresh.
Bug report
When two or more gateway plugins publish an entity with the same id (typically an area that several plugins use
by default), the gateway logs an ownership transfer warning on every entity refresh, for as long as it runs.
Steps to reproduce
Expected behavior
The conflict is reported once. The entity keeps a stable, documented owner.
Actual behavior
Each refresh registers the plugins in load order and hands the id from one plugin to the next, and every
hand-over logs:
With four plugins sharing one area that is four warnings per refresh, about 11,000 lines a day at the default
backstop interval, while nothing about the entity changes. The owner at the end of each refresh is always the
plugin registered last, which is also the plugin whose copy the entity cache serves, so the ownership itself is
consistent. Only the log is wrong.
Environment
Additional information
The warning comes from
PluginManager::register_entity_ownership(
src/ros2_medkit_gateway/src/plugins/plugin_manager.cpp), which warns whenever the owner of an id changes,including the transient changes inside one refresh.