prometheus/promql
Callum Styan 5bb7f00d00
change labelset comparison in promql engine to avoid false positive during detection of duplicates (#7058)
* Use go1.14 new hash/maphash to hash both RHS and LHS instead of XOR'ing
which has been resulting in hash collisions.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Refactor engine labelset signature generation, just use labels.Labels
instead of hashes.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address review comments; function comments + store result of
lhs.String+rhs.String as key.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Replace all signatureFunc usage with signatureFuncString.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Make optimizations to labels String function and generation of rhs+lhs
as string in resultMetric.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Use separate string functions that don't use strconv just for engine
maps.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Use a byte invalid separator instead of quoting and have a buffer
attached to EvalNodeHelper instead of using a global pool in the labels
package.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address review comments.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Address more review comments, labels has a function that now builds a
byte slice without turning it into a string.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* Use two different non-ascii hex codes as byte separators between labels
and between sets of labels when building bytes of a Labels struct.

Signed-off-by: Callum Styan <callumstyan@gmail.com>

* We only need the 2nd byte invalid sep. at the beginning of a
labels.Bytes

Signed-off-by: Callum Styan <callumstyan@gmail.com>
2020-05-12 14:03:15 -07:00
..
fuzz-data textparse: Add fuzzing and fix bug caught 2017-07-07 11:12:17 +02:00
parser promql/parser: Cleanup generatedParserResult accross reuse 2020-04-16 01:51:08 +02:00
testdata change labelset comparison in promql engine to avoid false positive during detection of duplicates (#7058) 2020-05-12 14:03:15 -07:00
bench_test.go Merge branch 'master' into split_parser 2020-02-19 15:18:13 +01:00
engine.go change labelset comparison in promql engine to avoid false positive during detection of duplicates (#7058) 2020-05-12 14:03:15 -07:00
engine_test.go storage: Removed SelectSorted method; Simplified interface; Added requirement for remote read to sort response. 2020-03-13 13:06:25 +00:00
functions.go change labelset comparison in promql engine to avoid false positive during detection of duplicates (#7058) 2020-05-12 14:03:15 -07:00
functions_test.go Bartek's suggestions 2020-02-25 13:57:30 +01:00
fuzz.go Add missing imports to fuzz tests 2020-02-17 16:09:23 +01:00
promql_test.go Addressed comments. 2020-02-17 18:03:57 +00:00
quantile.go func name ref correct "qauntile" -> "quantile" (#5834) 2019-08-06 06:11:16 +01:00
query_logger.go Remove MaxConcurrent from the PromQL engine opts (#6712) 2020-01-28 20:38:49 +00:00
query_logger_test.go promql: make active query tracker context-aware (#6701) 2020-01-27 22:29:44 +00:00
test.go Fixed wrongly handled not ready TSDB on web and API. (#7182) 2020-04-29 17:16:14 +01:00
test_test.go storage: Removed SelectSorted method; Simplified interface; Added requirement for remote read to sort response. 2020-03-13 13:06:25 +00:00
value.go Merge branch 'master' into split_parser 2020-02-19 15:18:13 +01:00