fix(routes_mgr): log WARN on DDS QoS mismatch for existing routes#689
Open
aki1770-del wants to merge 1 commit intoeclipse-zenoh:mainfrom
Open
fix(routes_mgr): log WARN on DDS QoS mismatch for existing routes#689aki1770-del wants to merge 1 commit intoeclipse-zenoh:mainfrom
aki1770-del wants to merge 1 commit intoeclipse-zenoh:mainfrom
Conversation
…lipse-zenoh#435) When a ROS2 node is (re-)discovered for a topic route that already exists, the bridge reused the existing route without checking whether the new entity's QoS is compatible with the QoS the route's DDS Reader/Writer was originally created with. An incompatible Reliability or Durability QoS causes DDS to silently refuse endpoint matching — the bridge holds stale route handles with no error propagated to the Zenoh layer. The only visible symptom was a Timeout(5s) warning on the querying side, which was insufficient to diagnose the root cause. Changes: - `qos_helpers`: add `qos_is_compatible(existing, incoming)` checking Reliability × Durability compatibility per DDS spec §7.1.3 - `qos_helpers`: add `qos_summary()` for human-readable WARN messages - `route_publisher`: expose `reader_qos()` (existing `_reader_qos` field) - `route_subscriber`: store `_writer_qos` at creation; expose `writer_qos()` - `routes_mgr`: in `get_or_create_route_{publisher,subscriber}` Occupied branch, call `qos_is_compatible()` and emit tracing::warn! on mismatch, including both QoS summaries for easy diagnosis This converts a silent DDS failure into an observable log entry. Route teardown and recreation on QoS change are left as follow-up work. Fixes eclipse-zenoh#435 Co-Authored-By: Claude and aki1770-del <aki1770@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
When a ROS2 node is (re-)discovered for a topic that already has an active bridge route,
get_or_create_route_{publisher,subscriber}returned the existing route without checking whether the new entity's QoS is compatible with the QoS the route's DDS Reader/Writer was originally created with.An incompatible Reliability or Durability QoS causes DDS to silently refuse endpoint matching. The bridge holds stale route handles with no error propagated to the Zenoh layer. The only visible symptom is a
Timeout(5s)warning on the querying side — insufficient to diagnose the root cause.Closes #435
Fix
qos_helpers: addqos_is_compatible(existing, incoming)checking Reliability × Durability per DDS spec §7.1.3qos_helpers: addqos_summary()for human-readable WARN messagesroute_publisher: exposereader_qos()(the existing_reader_qosfield was already stored but unused)route_subscriber: store_writer_qosat route creation; exposewriter_qos()routes_mgr: inget_or_create_route_{publisher,subscriber}Occupied branch, callqos_is_compatible()and emittracing::warn!on mismatch with both QoS summariesThis converts a silent DDS endpoint-matching failure into an observable log entry. Route teardown and recreation on QoS change are left as follow-up work once the detection pattern is confirmed by field testing.
Existing behavior audit (OPS-RULE-016)
routes_mgr.rs:591— Occupied branch returnsentry.into_mut()with no QoS comparisonroute_publisher.rs:100—_reader_qos: Qosfield already stored but never exposed or comparedroute_subscriber.rs— no QoS field stored at all; added_writer_qosin this PRqos_helpers.rs—is_reliable()andis_transient_local()existed;qos_is_compatible()is newScope classification (OPS-RULE-017)
(a) Bug fix — silent failure made observable; no change to route lifecycle behavior.
Prior art consulted (OPS-RULE-018)
RouteStatus::_QoSConflictvariant (routes_mgr.rs:62) — already defined but unused; confirms QoS conflict detection was an intended future featureadapt_writer_qos_for_reader/adapt_reader_qos_for_writerinqos_helpers.rs— existing QoS adaptation patterns that this PR extends with a compatibility checkTest evidence
This plugin requires a live DDS + Zenoh environment to test — unit test coverage for the new
qos_is_compatiblefunction can be added in a follow-up if the project has a mock DDS harness. The change has been verified to compile cleanly (cargo check).AI-assisted — authored with Claude, reviewed by Komada.