prometheus/promql
György Krajcsovits df94ecebab
fix(promql): histogram_count inconsistent
The problem is in the counter reset detection. The code that loads the
samples is matrixIterSlice which uses the typed Buffer iterator, which
will preload the integer histogram samples, however the last sample is
always(!) loaded as a float histogram sample in matrixIterSlice and the
optimized iterator fails to detect counter resets in that case.

Also the iterator does not reset lastH, lastFH properly.

Ref: https://github.com/prometheus/prometheus/issues/16681

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2025-06-03 12:31:27 +02:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
parser Merge pull request #16041 from prymitive/parenExprEnd 2025-05-22 09:32:17 +02:00
promqltest feature: type-and-unit-labels (PROM-39 implementation) (#16228) 2025-05-17 09:37:25 +00:00
bench_test.go chore(engine): add simple NHCB benchmark 2025-05-07 13:54:34 +02:00
durations_test.go Address feedback 2025-04-07 12:58:34 +02:00
durations.go Address feedback 2025-04-03 13:19:55 +02:00
engine_internal_test.go chore: enable gci linter (#16245) 2025-03-22 15:46:13 +00:00
engine_test.go test(promql): histogram_count inconsistent 2025-06-03 12:11:59 +02:00
engine.go chore: fix some comments 2025-05-27 23:14:41 +08:00
functions_internal_test.go Fix issue where summation of +/- infinity returns NaN instead of infinity 2024-06-28 11:26:54 +10:00
functions_test.go Refactor engine creation in tests 2024-07-14 13:58:51 +02:00
functions.go feature: type-and-unit-labels (PROM-39 implementation) (#16228) 2025-05-17 09:37:25 +00:00
fuzz_test.go fix: use "ErrorContains" or "EqualError" instead of "Contains(t, err.Error()" and "Equal(t, err.Error()" (#15094) 2024-10-06 16:35:29 +00:00
fuzz.go feature: type-and-unit-labels (PROM-39 implementation) (#16228) 2025-05-17 09:37:25 +00:00
histogram_stats_iterator_test.go fix(promql): histogram_count inconsistent 2025-06-03 12:31:27 +02:00
histogram_stats_iterator.go fix(promql): histogram_count inconsistent 2025-06-03 12:31:27 +02:00
info_test.go [FEATURE] PromQL: Add experimental info function MVP (#14495) 2024-10-16 13:52:11 +01:00
info.go chore: enable unused-parameter from revive 2025-02-19 19:50:28 +01:00
promql_test.go Refactor engine creation in tests 2024-07-14 13:58:51 +02:00
quantile_test.go Export quantile functions (#15190) 2024-11-27 13:20:23 +01:00
quantile.go promql: histogram_fraction for bucket histograms (#16095) 2025-04-23 00:28:31 +02:00
query_logger_test.go chore: Fix typos (#14868) 2024-09-10 22:32:03 +02:00
query_logger.go chore!: adopt log/slog, remove go-kit/log 2024-10-07 15:58:50 -04:00
value_test.go test: move most PromQL tests into separate test package 2024-05-08 16:28:56 +01:00
value.go promql: support variable scalar parameter in aggregations in range queries (#16404) 2025-05-11 15:40:31 +02:00