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 support for query/reply messages to Downsampling #1797

Merged

Conversation

oteffahi
Copy link
Contributor

@oteffahi oteffahi commented Feb 26, 2025

Adds query/reply message filters to Downsampling interceptor. Query/reply message types are respectively named "query" and "reply", with the addition of "push" which is the previously supported Publication message type.
Downsampling config with different message types will apply its rules on all these message types as one flow of messages. Seperate Downsampling configurations with one type each will apply the rules per message type.

Also changes Downsampling config to accept a list of flows instead of a single one, to limit the need to duplicate a downsampling conf for query/reply messages which go in opposite flows.

Note that this PR breaks compatibility with previous format of Downsampling configuration.

In the current implementation, rules within the same Downsampling
config share the same state if configured on the same keyexpr.
Having message types within the rules can lead users to configure
different messages types within different rules with same keyexpr,
which would produce the same result as having all message types
within the same rule, i.e downsampling on the whole set of messages
instead of doing so seperately for each type.
@oteffahi oteffahi self-assigned this Feb 26, 2025
Copy link

PR missing one of the required labels: {'dependencies', 'bug', 'new feature', 'internal', 'enhancement', 'breaking-change', 'documentation'}

@oteffahi oteffahi added new feature Something new is needed breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime) labels Feb 26, 2025
@oteffahi
Copy link
Contributor Author

oteffahi commented Feb 26, 2025

Clarification regarding my commit message for 963eb84: two rules on the same keyexpr would have the last rule in the list overwrite the previous one, which further supports why message types need to be moved out of the rules list.

@oteffahi oteffahi marked this pull request as ready for review February 27, 2025 11:07
@gabrik
Copy link
Contributor

gabrik commented Feb 27, 2025

@RemiBarthe 👀

@OlivierHecart OlivierHecart enabled auto-merge (squash) March 7, 2025 15:51
Copy link

codecov bot commented Mar 7, 2025

Codecov Report

Attention: Patch coverage is 93.93939% with 4 lines in your changes missing coverage. Please review.

Project coverage is 70.90%. Comparing base (ee9fc7e) to head (1f6d2d7).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
zenoh/src/net/routing/interceptor/downsampling.rs 92.59% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1797      +/-   ##
==========================================
+ Coverage   70.35%   70.90%   +0.54%     
==========================================
  Files         359      360       +1     
  Lines       64617    65135     +518     
==========================================
+ Hits        45460    46182     +722     
+ Misses      19157    18953     -204     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@OlivierHecart OlivierHecart merged commit 41ac4a7 into eclipse-zenoh:main Mar 7, 2025
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking-change Indicates that the issue implies a breaking change (be it at compile time or at runtime) new feature Something new is needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants