mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2025-01-30 15:22:07 +00:00
lib/storage: do not deduplicate blocks with less than 32 samples during merge
This should improve deduplication accuracy for blocks with higher number of samples.
This commit is contained in:
parent
ccd3aa4f15
commit
56d6b8ed0a
1 changed files with 5 additions and 0 deletions
|
@ -57,6 +57,11 @@ func deduplicateSamplesDuringMerge(srcTimestamps []int64, srcValues []int64) ([]
|
|||
if *minScrapeInterval <= 0 {
|
||||
return srcTimestamps, srcValues
|
||||
}
|
||||
if len(srcTimestamps) < 32 {
|
||||
// Do not de-duplicate small number of samples during merge
|
||||
// in order to improve deduplication accuracy on later stages.
|
||||
return srcTimestamps, srcValues
|
||||
}
|
||||
minDelta := getMinDelta()
|
||||
if !needsDedup(srcTimestamps, minDelta) {
|
||||
// Fast path - nothing to deduplicate
|
||||
|
|
Loading…
Reference in a new issue