From 5be7c26b4db419ff5fb66bcb8cd4416d62facd27 Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Wed, 31 Jan 2024 16:28:17 +0100 Subject: [PATCH] Improve TODO comments --- .../net/routing/hat/linkstate_peer/queries.rs | 12 ++++----- zenoh/src/net/routing/hat/p2p_peer/queries.rs | 6 ++--- zenoh/src/net/routing/hat/router/pubsub.rs | 26 +++++++++---------- zenoh/src/net/routing/hat/router/queries.rs | 20 +++++++------- zenoh/src/net/runtime/adminspace.rs | 2 +- 5 files changed, 33 insertions(+), 33 deletions(-) diff --git a/zenoh/src/net/routing/hat/linkstate_peer/queries.rs b/zenoh/src/net/routing/hat/linkstate_peer/queries.rs index c6b4b50492..6281993c93 100644 --- a/zenoh/src/net/routing/hat/linkstate_peer/queries.rs +++ b/zenoh/src/net/routing/hat/linkstate_peer/queries.rs @@ -143,7 +143,7 @@ fn send_sourced_queryable_to_net_childs( node_id: routing_context, }, body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: *qabl_info, }), @@ -181,7 +181,7 @@ fn propagate_simple_queryable( ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: info, }), @@ -353,7 +353,7 @@ fn send_forget_sourced_queryable_to_net_childs( node_id: routing_context, }, body: DeclareBody::UndeclareQueryable(UndeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) ext_wire_expr: WireExprType { wire_expr }, }), }, @@ -377,7 +377,7 @@ fn propagate_forget_simple_queryable(tables: &mut Tables, res: &mut Arc) { ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: info, }), diff --git a/zenoh/src/net/routing/hat/p2p_peer/queries.rs b/zenoh/src/net/routing/hat/p2p_peer/queries.rs index e9b39bb341..35a10557dc 100644 --- a/zenoh/src/net/routing/hat/p2p_peer/queries.rs +++ b/zenoh/src/net/routing/hat/p2p_peer/queries.rs @@ -100,7 +100,7 @@ fn propagate_simple_queryable( ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: info, }), @@ -170,7 +170,7 @@ fn propagate_forget_simple_queryable(tables: &mut Tables, res: &mut Arc ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber { - id: 0, // TODO + id: 0, // @TODO use proper SubscriberId (#703) ext_wire_expr: WireExprType { wire_expr }, }), }, @@ -426,7 +426,7 @@ fn propagate_forget_simple_subscription_to_peers(tables: &mut Tables, res: &Arc< ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber { - id: 0, // TODO + id: 0, // @TODO use proper SubscriberId (#703) ext_wire_expr: WireExprType { wire_expr }, }), }, @@ -591,7 +591,7 @@ pub(super) fn undeclare_client_subscription( ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::UndeclareSubscriber(UndeclareSubscriber { - id: 0, // TODO + id: 0, // @TODO use proper SubscriberId (#703) ext_wire_expr: WireExprType { wire_expr }, }), }, @@ -613,7 +613,7 @@ fn forget_client_subscription( pub(super) fn pubsub_new_face(tables: &mut Tables, face: &mut Arc) { let sub_info = SubscriberInfo { - reliability: Reliability::Reliable, // @TODO + reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers mode: Mode::Push, }; @@ -627,7 +627,7 @@ pub(super) fn pubsub_new_face(tables: &mut Tables, face: &mut Arc) { ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareSubscriber(DeclareSubscriber { - id: 0, // TODO + id: 0, // @TODO use proper SubscriberId (#703) wire_expr: key_expr, ext_info: sub_info, }), @@ -654,7 +654,7 @@ pub(super) fn pubsub_new_face(tables: &mut Tables, face: &mut Arc) { ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareSubscriber(DeclareSubscriber { - id: 0, // TODO + id: 0, // @TODO use proper SubscriberId (#703) wire_expr: key_expr, ext_info: sub_info, }), @@ -731,7 +731,7 @@ pub(super) fn pubsub_tree_change( for sub in subs { if *sub == tree_id { let sub_info = SubscriberInfo { - reliability: Reliability::Reliable, // @TODO + reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers mode: Mode::Push, }; send_sourced_subscription_to_net_childs( @@ -795,7 +795,7 @@ pub(super) fn pubsub_linkstate_change(tables: &mut Tables, zid: &ZenohId, links: ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::UndeclareSubscriber( UndeclareSubscriber { - id: 0, // TODO + id: 0, // @TODO use proper SubscriberId (#703) ext_wire_expr: WireExprType { wire_expr }, }, ), @@ -810,7 +810,7 @@ pub(super) fn pubsub_linkstate_change(tables: &mut Tables, zid: &ZenohId, links: face_hat_mut!(dst_face).local_subs.insert(res.clone()); let key_expr = Resource::decl_key(res, dst_face); let sub_info = SubscriberInfo { - reliability: Reliability::Reliable, // TODO + reliability: Reliability::Reliable, // @TODO compute proper reliability to propagate from reliability of known subscribers mode: Mode::Push, }; dst_face.primitives.send_declare(RoutingContext::with_expr( @@ -819,7 +819,7 @@ pub(super) fn pubsub_linkstate_change(tables: &mut Tables, zid: &ZenohId, links: ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareSubscriber(DeclareSubscriber { - id: 0, // TODO + id: 0, // @TODO use proper SubscriberId (#703) wire_expr: key_expr, ext_info: sub_info, }), diff --git a/zenoh/src/net/routing/hat/router/queries.rs b/zenoh/src/net/routing/hat/router/queries.rs index 674841e830..90944a524f 100644 --- a/zenoh/src/net/routing/hat/router/queries.rs +++ b/zenoh/src/net/routing/hat/router/queries.rs @@ -214,7 +214,7 @@ fn send_sourced_queryable_to_net_childs( node_id: routing_context, }, body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: *qabl_info, }), @@ -262,7 +262,7 @@ fn propagate_simple_queryable( ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: info, }), @@ -494,7 +494,7 @@ fn send_forget_sourced_queryable_to_net_childs( node_id: routing_context, }, body: DeclareBody::UndeclareQueryable(UndeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) ext_wire_expr: WireExprType { wire_expr }, }), }, @@ -518,7 +518,7 @@ fn propagate_forget_simple_queryable(tables: &mut Tables, res: &mut Arc) { ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: info, }), @@ -789,7 +789,7 @@ pub(super) fn queries_new_face(tables: &mut Tables, face: &mut Arc) { ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: info, }), @@ -889,7 +889,7 @@ pub(super) fn queries_linkstate_change(tables: &mut Tables, zid: &ZenohId, links ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::UndeclareQueryable( UndeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) ext_wire_expr: WireExprType { wire_expr }, }, ), @@ -912,7 +912,7 @@ pub(super) fn queries_linkstate_change(tables: &mut Tables, zid: &ZenohId, links ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: key_expr, ext_info: info, }), diff --git a/zenoh/src/net/runtime/adminspace.rs b/zenoh/src/net/runtime/adminspace.rs index b0e6d63883..f6fb13e76e 100644 --- a/zenoh/src/net/runtime/adminspace.rs +++ b/zenoh/src/net/runtime/adminspace.rs @@ -274,7 +274,7 @@ impl AdminSpace { ext_tstamp: None, ext_nodeid: ext::NodeIdType::default(), body: DeclareBody::DeclareQueryable(DeclareQueryable { - id: 0, // TODO + id: 0, // @TODO use proper QueryableId (#703) wire_expr: [&root_key, "/**"].concat().into(), ext_info: QueryableInfo { complete: 0,