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
Keep only non-matched series in streaming aggregation #4243
Comments
Also if using stream aggregation with some match filter without @Amper are there plans when it's going to be implemented? |
Hi @oleg-tolmashov, i hope to do it in the next quarter. For now, you can use workaround with separate remoteWrite and dropping metrics with relabeling. |
Hi @oleg-tolmashov @Amper So the idea is to change default behavior to:
Also, I was going to implement this one next. |
@zekker6 I got it, great! |
@zekker6 Do you have any updates on when it will be available in vmagent? |
Changes default behaviour of keepInput flag to write series which did not match any aggregators to the remote write. See: #4243 Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com>
…lag (#4575) * {lib/streamaggr,vmagent/remotewrite}: breaking change for keepInput flag Changes default behaviour of keepInput flag to write series which did not match any aggregators to the remote write. See: #4243 Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com> * Update app/vmagent/remotewrite/remotewrite.go Co-authored-by: Roman Khavronenko <roman@victoriametrics.com> --------- Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com> Co-authored-by: Roman Khavronenko <roman@victoriametrics.com> Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
- Use a byte slice instead of a map for tracking indexes for matching series. This improves performance, since access by slice index is faster than access by map key. - Re-use the byte slice for tracking indexes for matching series. This removes unnecessary memory allocations and improves stream aggregation performance a bit. - Add an ability to return to the previous behvaiour by specifying -remoteWrite.streamAggr.dropInput command-line flag. In this case all the input samples are dropped when stream aggregation is enabled. - Backport the new stream aggregation behaviour from vmagent to single-node VictoriaMetrics when -streamAggr.config option is set. - Improve docs regarding this change at docs/CHANGELOG.md - Document the new behavior at docs/stream-aggregation.md Updates #4243 Updates #4575
…lag (#4575) * {lib/streamaggr,vmagent/remotewrite}: breaking change for keepInput flag Changes default behaviour of keepInput flag to write series which did not match any aggregators to the remote write. See: #4243 Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com> * Update app/vmagent/remotewrite/remotewrite.go Co-authored-by: Roman Khavronenko <roman@victoriametrics.com> --------- Signed-off-by: Zakhar Bessarab <z.bessarab@victoriametrics.com> Co-authored-by: Roman Khavronenko <roman@victoriametrics.com> Co-authored-by: Aliaksandr Valialkin <valyala@victoriametrics.com>
- Use a byte slice instead of a map for tracking indexes for matching series. This improves performance, since access by slice index is faster than access by map key. - Re-use the byte slice for tracking indexes for matching series. This removes unnecessary memory allocations and improves stream aggregation performance a bit. - Add an ability to return to the previous behvaiour by specifying -remoteWrite.streamAggr.dropInput command-line flag. In this case all the input samples are dropped when stream aggregation is enabled. - Backport the new stream aggregation behaviour from vmagent to single-node VictoriaMetrics when -streamAggr.config option is set. - Improve docs regarding this change at docs/CHANGELOG.md - Document the new behavior at docs/stream-aggregation.md Updates #4243 Updates #4575
FYI, the commit 6265157 changes the default behavior for stream aggregation, so now non-matched input series are preserved in the output. The old behavior can be restored by passing This commit will be included in the next release. In the mean time it is possible to test the new stream aggregation behavior by building |
vmagent changes the default behavior for stream aggregation for matched series starting from v1.92.0. Closing the feature request as done. |
Is your feature request related to a problem? Please describe
At the moment regardless of matching in config streaming aggregation:
keepInput=true
keepInput=false
But in typical case user need to keep non-matched input series and drop all matched input series.
Now this effect can only be achieved with two coordinated remoteWrite (see additional information of this issue).
Describe the solution you'd like
There are two options for implementation (without backward compatibility break):
streamAggr.dropMatched
, that drops all matched series if flagstreamAggr.keepInput
is setstreamAggr.keepMismatched
, that keep all matched series if flagstreamAggr.keepInput
isn't setUpdate:
As described in this comment: based on user feedback it makes more sense to implement it with backward incompatible change and implement the following flow:
Setting keepInput=true in this case allows keeping full source data (both aggregated and original).
Describe alternatives you've considered
No response
Additional information
Discussion: https://victoriametrics.slack.com/archives/CGZF1H6L9/p1682204682016349
The text was updated successfully, but these errors were encountered: