Skip to content

[BUG] Gateway logs an ownership transfer on every refresh when several plugins publish one entity id #701

Description

@bburda

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

  1. Load two or more plugins that publish an area with the same id.
  2. Start the gateway and let it refresh its entities (a plugin's change notification or the periodic backstop).
  3. 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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions