mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-06-28 04:57:20 +03:00
Fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10196 Prefer the non StaleNaN value when both StaleNaN and non-StaleNaN samples share the timestamp during deduplication(downsampling). The scenario can occur when: 1. Multiple vmagent instances scrape the same target(without -promscrape.cluster.name flag), one instance fails to scrape due to issues such as network, while others succeed. 2. Multiple vmalert instances evaluate the same recording rule, with one instance receiving a partial response while others receive a complete response. In both cases, since the samples share the same timestamp and represent the metric state at that moment, the non-StaleNaN value is entirely valid, whereas the StaleNaN could be caused by other unknown issues. Therefore, it is reasonable to prioritize the non-StaleNaN value.