query-tee: ignore series count mismatches if all samples are within recent sample window #8749
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does
This PR fixes an issue where query-tee considers two responses to be different if they have different numbers of series, but all of the samples are within the recent sample window and so would be ignored during comparison.
For example, imagine it is now T=10, and the recent sample window is 2. Backend A returns a vector with 11 series, all with samples at T=10, and backend B returns 12 series, all with samples at T=10. (This can happen if the two queries are racing with writes for the queried data.)
Without this change, query-tee would consider the comparison failed, but if both responses had the same number of series, it would consider the comparison successful regardless of the sample values.
With this change, query-tee will consider both responses as equivalent.
Which issue(s) this PR fixes or relates to
(none)
Checklist
CHANGELOG.md
updated - the order of entries should be[CHANGE]
,[FEATURE]
,[ENHANCEMENT]
,[BUGFIX]
.about-versioning.md
updated with experimental features.