Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Change liveliness tokens logs from warn to debug level #22

Merged
merged 2 commits into from
Sep 23, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions rmw_zenoh_cpp/src/detail/graph_cache.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -595,8 +595,10 @@ void GraphCache::parse_del(
return entity->zid() == node_it.second->zid_ && entity->nid() == node_it.second->nid_;
});
if (node_it == range.second) {
// Node does not exist.
RMW_ZENOH_LOG_WARN_NAMED(
// Node does not exist or its liveliness token has been unregistered before one of its
// pubs/subs/service liveliness token. This could happen since Zenoh doesn't guarantee
// any order for unregistration events if the remote Node closed abruptly or was disconnected.
RMW_ZENOH_LOG_DEBUG_NAMED(
"rmw_zenoh_cpp",
"Received liveliness token to remove unknown node /%s from the graph. Ignoring...",
entity->node_name().c_str()
Expand All @@ -606,16 +608,17 @@ void GraphCache::parse_del(

if (entity->type() == EntityType::Node) {
// Node
// The liveliness tokens to remove pub/subs should be received before the one to remove a node
// given the reliability QoS for liveliness subs. However, if we find any pubs/subs present in
// the node below, we should update the count in graph_topics_.
// In case the remote Node closed abruptly or was disconnected, Zenoh could deliver the
// liveliness tokens unregistration events in any order.
// If the event for Node unregistration comes before the unregistration of its
// pubs/subs/services, we should update the count in graph_topics_ and graph_services_.
const GraphNodePtr graph_node = node_it->second;
if (!graph_node->pubs_.empty() ||
!graph_node->subs_.empty() ||
!graph_node->clients_.empty() ||
!graph_node->services_.empty())
{
RMW_ZENOH_LOG_WARN_NAMED(
RMW_ZENOH_LOG_DEBUG_NAMED(
"rmw_zenoh_cpp",
"Received liveliness token to remove node /%s from the graph before all pub/subs/"
"clients/services for this node have been removed. Removing all entities first...",
Expand Down