-
Notifications
You must be signed in to change notification settings - Fork 7
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
[PLAT-108920] adding another dedup iterator to merge samples instead of skipping them #41
Conversation
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.
awesome work!
const UseMergedSeries = "use_merged_series" | ||
|
||
// mergedSeries is a storage.Series that implements a simple merge sort algorithm. | ||
// when replicas has conflict values at the same timestamp, the first replica will be selected. |
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.
In our use case, there are no conflicting values wit the same timestamp because such data samples are rejected in the write path.
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.
oh, i meant it isn't exactly a merge sort, it will only keep 1 value at the same timestamp.
type Options struct { | ||
GroupReplicaPartialResponseStrategy bool | ||
EnableDedupMerge bool | ||
} |
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.
This is much better than a simple var! We can add more options in the future.
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.
yep
…of skipping them Signed-off-by: Yi Jin <[email protected]>
Raw data has 3 copies, one has missing data points
Before this change, dips in data points:
After this change:
Changes
Verification
More tests, especially during rolling update and the histogram used to have large spikes:
After the change it is gone: