-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: introduce the advanced publisher and subscriber #368
base: rolling
Are you sure you want to change the base?
Conversation
e0c490f
to
1f9357f
Compare
Update: The deadlock fix has been merged. Mark this PR as ready for review. |
Test Failure
No new failure is found. |
Update: bump up zenoh-cpp version to include the memory leak fix eclipse-zenoh/zenoh-cpp#363. |
Will rebase once #405 is merged. |
08b0906
to
b76ee4c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please see feedback inline.
I have the following additional questions
- It looks like this PR does not fix [Test Failure] rclcpp_action / test_client #326. But from my experience, it changes the behavior from deterministically failing to failing sometimes. ie, the test is now flaky. Do you observe the same?
- With
AdvancedSubscribers
do we no longer need to callGet()
when we detect anAdvancedPublisher
with publication cache? This was needed to fix Subscribers sometimes not getting messages from topics using durability transient_local #263.
adv_sub_opts.history->detect_late_publishers = true; | ||
adv_sub_opts.history->max_samples = entity_->topic_info()->qos_.depth; | ||
adv_sub_opts.recovery = zenoh::ext::SessionExt::AdvancedSubscriberOptions::RecoveryOptions{}; | ||
adv_sub_opts.recovery->periodic_queries_period_ms = 1000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again looking at the documentation, it sounds like recovery options should only be enabled if reliability is RELIABLE
. Could you clarify on the behavior?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similarly, answered in #368 (comment).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we add some comments on why a value of 1000
is appropriate for periodic_queries_period_ms
?
…claration deadlock
b76ee4c
to
9cc776b
Compare
Here’s an improved version of your paragraph with clearer phrasing and a more professional tone:
|
Redid the test with the repos. No new failures were found.
|
sub_options.query_keyexpr = std::move(selector_ke); | ||
// Tell the PublicationCache's Queryable that the query accepts any key expression as a reply. | ||
// By default a query accepts only replies that matches its query selector. | ||
// This allows us to selectively query certain PublicationCaches when defining the | ||
// set_querying_subscriber_callback below. | ||
sub_options.query_accept_replies = ZC_REPLY_KEYEXPR_ANY; | ||
// As this initial query is now using a "*", the query target is not COMPLETE. | ||
sub_options.query_target = Z_QUERY_TARGET_ALL; | ||
// We set consolidation to none as we need to receive transient local messages | ||
// from a number of publishers. Eg: To receive TF data published over /tf_static | ||
// by various publishers. | ||
sub_options.query_consolidation = | ||
zenoh::QueryConsolidation(zenoh::ConsolidationMode::Z_CONSOLIDATION_MODE_NONE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And it does not look like there is a way to set these parameters anymore. Can you confirm that the behavior with the AdvancedSubscriber will match the expectations of the old implementation?
With this PR, we replace the
QueryingSubscriber
andPublicationCache
(+ a normal publisher)with the
AdvancedSubscriber
andAdvancedPublisher
.NOTE: A deadlock is found when undeclaring advanced subscribers. It will be fixed once eclipse-zenoh/zenoh#1685 is merged and synced with zenoh-c.