Make transition event topic reliable to avoid topic lost - #1171
Conversation
c26adc8 to
614c989
Compare
1f7f713 to
aa503cd
Compare
|
@kjjpc Thanks for reporting. We discussed this at the recent PMC maintainers' meeting and came to the following conclusion. In this case, changing the durability of the transition event could have far reaching impacts on the system that are undesirable. The main concern is that if you had a late-joining lifecycle node, that it could be transitioned inadvertently by the latched topic. This would be pretty un-intuitive and could cause issues in larger systems. The real issue here stems from the fact that we are triggering the transition only when the process becomes available, rather than waiting for the node to be in the I think that the real solution here would be detect when the node is started in the The other alternative would be to add on |
|
i might be mistaken, but i was thinking opposite...
either that is lifecycle node or just a subscription, delivering the latest state change event via latched topic to the subscription that does specify the QoS with durability by the user application makes sense? |
Hmm, maybe my understanding of the issue here was wrong. I thought we were making the subscription |
|
@mjcarroll |
|
Hey @mjcarroll @mjcarroll, is this change going to be merged or discussion is ongoing? I'd like this feature to be reliable. If any additional work needs to be done I can help |
|
Pulls: #1171 |
|
Tick the box to add this pull request to the merge queue (same as
|
|
I think @fujitatomoya is right that the behavior change would not occur unless the subscriber also requests transient_local, otherwise the subscriber will only get new messages when subscribing with volatile. So I think this should be safe. If we also change some common code that makes the subscription transient_local, then I think we could be in some danger of undesired behavior change. Now whether or not this is the right fix for the original problem, that I'm not sure about. If it's a race between the state changing and the subscription being established, then this would fix the problem if you also change the subscription, but it has the side-effect that late joiners (really late joiners) will get a message on this topic indicating the state changed, even though the state change happened long in the past. Instead, I think it would make more sense to establish a volatile pub-sub pair for event notification, but also use a service call to query the state explicitly when first starting to listen to the state of a node. That way you never get stale messages on the event topic, but also don't rely on racing that topic for the first state observed when starting a monitoring process. I started a CI just to see what the status of the code is, but I think this needs more discussion. @fujitatomoya or @mjcarroll what do you think? |
|
Tick the box to add this pull request to the merge queue (same as
|
|
@wjwwood i agree, maybe we can discuss what the original problem is before considering the fixes. |
|
@Mergifyio rebase |
🛑 The pull request rule doesn't match anymoreDetailsThis action has been cancelled. |
Signed-off-by: Junya Kuwada <kuwada.junya@jp.panasonic.com>
Co-authored-by: Tomoya Fujita <Tomoya.Fujita@sony.com> Signed-off-by: Kuwada Junya <35495327+kjjpc@users.noreply.github.com> Signed-off-by: Junya Kuwada <kuwada.junya@jp.panasonic.com>
Signed-off-by: Junya Kuwada <kuwada.junya@jp.panasonic.com>
aa503cd to
07750b2
Compare
This PR is related to #1166.
Lifecycle action of launch_ros occasionally fails to transit because of topic event lost.
This PR make transition event topic reliable.
After the marge of this PR, I will make a PR for launch_ros.