From 1015a503c5fc9fe05a2a64620c3f8efb244aef2f Mon Sep 17 00:00:00 2001 From: OlivierHecart Date: Fri, 17 May 2024 12:19:45 +0200 Subject: [PATCH 1/3] Recompute routes on DeclareFinal to activate writer side filtering --- zenoh/src/net/routing/dispatcher/face.rs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/zenoh/src/net/routing/dispatcher/face.rs b/zenoh/src/net/routing/dispatcher/face.rs index c8cf5d8770..6eb9ee5b90 100644 --- a/zenoh/src/net/routing/dispatcher/face.rs +++ b/zenoh/src/net/routing/dispatcher/face.rs @@ -335,6 +335,14 @@ impl Primitives for Face { .local_interests .entry(id) .and_modify(|interest| interest.finalized = true); + + // recompute routes + // TODO: disable routes and recompute them in parallel to avoid holding + // tables write lock for a long time. + let mut wtables = zwrite!(self.tables.tables); + let mut root_res = wtables.root_res.clone(); + update_data_routes_from(&mut wtables, &mut root_res); + update_query_routes_from(&mut wtables, &mut root_res); } } } From 6504777eea186b6ac5cbdce188b1b874a92fe967 Mon Sep 17 00:00:00 2001 From: yellowhatter Date: Mon, 20 May 2024 13:43:04 +0300 Subject: [PATCH 2/3] Fixed stabby ( https://github.com/rust-lang/rust/issues/123281 ) --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index 2ec98a4761..fec6a43871 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -149,7 +149,7 @@ serde_cbor = "0.11.2" serde_json = "1.0.114" serde-pickle = "1.1.1" serde_yaml = "0.9.19" -stabby = "4.0.5" +stabby = "5.0.0" sha3 = "0.10.6" shared_memory = "0.12.4" shellexpand = "3.0.0" From 220d7699c86bb6e1212a9e5484e5f72d03c9fc58 Mon Sep 17 00:00:00 2001 From: yellowhatter Date: Mon, 20 May 2024 20:53:45 +0300 Subject: [PATCH 3/3] temp: use fixed stabby from branch --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index fec6a43871..a25aff85d7 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -149,7 +149,7 @@ serde_cbor = "0.11.2" serde_json = "1.0.114" serde-pickle = "1.1.1" serde_yaml = "0.9.19" -stabby = "5.0.0" +stabby = { git="https://github.com/ZettaScaleLabs/stabby.git", branch="fix_stabby_abi_build" } sha3 = "0.10.6" shared_memory = "0.12.4" shellexpand = "3.0.0"