Skip to content
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

Add advanced pub/sub last sample miss detection #1701

Open
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

oteffahi
Copy link
Contributor

@oteffahi oteffahi commented Jan 9, 2025

Closes #1657

@oteffahi oteffahi self-assigned this Jan 9, 2025
@oteffahi oteffahi added the new feature Something new is needed label Jan 9, 2025
@oteffahi oteffahi marked this pull request as ready for review January 10, 2025 16:03
Comment on lines +990 to +996
// TODO: add state to avoid sending multiple queries for the same heartbeat if its periodicity is higher than the query response time

// check that it's not an old sn or a pending sample's sn
if (state.last_delivered.is_none()
|| state.last_delivered.is_some_and(|sn| heartbeat_sn > sn))
&& !state.pending_samples.contains_key(&heartbeat_sn)
{
Copy link
Contributor Author

@oteffahi oteffahi Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This TODO could be covered by not sending a query unless there are no pending queries (i.e no pending queries from heartbeat, periodic queries, or miss detection queries). Does that sound right @OlivierHecart ?

Copy link
Contributor Author

@oteffahi oteffahi Jan 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hypothetically speaking, doing so might risk that (in some potential high-load cases) heartbeats would get denied by other querying mechanisms and never result in a heartbeat query...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
new feature Something new is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Advanced Pub/Sub Heartbeat
1 participant