-
Notifications
You must be signed in to change notification settings - Fork 224
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
Zenoh should only push liveliness updates (i.e. token PUT/DELETE) when fresh information is available: liveliness subscribers without history should not receive a token PUT if the token already existed before the subscriber was declared.
When the broker is a peer, this property is upheld. But when the broker is a router it is broken.
To reproduce
#!/usr/bin/env nuze --experimental-options --no-default-session
def with-broker-mode [mode] {
zenoh open -s a {id:a,mode:$mode,listen:{endpoints:[tcp/::1:9000]}}
zenoh open -s c1 {id:c1,mode:client,connect:{endpoints:[tcp/::1:9000]}}
zenoh open -s c2 {id:c2,mode:client,connect:{endpoints:[tcp/::1:9000]}}
zenoh open -s c3 {id:c3,mode:client,connect:{endpoints:[tcp/::1:9000]}}
sleep 100ms
print "c1: declare token on x"
let x1 = zenoh liveliness declare-token -s c1 x
sleep 100ms
job spawn {zenoh liveliness sub -s c2 x | each {|s| print $"c2: new token ($s.kind) on x"}}
sleep 100ms
print "c3: declare token on x"
let x3 = zenoh liveliness declare-token -s c3 x
sleep 100ms
job list | each {|j| job kill $j.id}
zenoh session list | each {|s| zenoh session close -s $s.name}
null
}
with-broker-mode peer
# c1: declare token on x
# c3: declare token on x
with-broker-mode router
# c1: declare token on x
# c3: declare token on x
# c2: new token PUT on xSystem info
- rev: 7d12a8a
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working