Xiaochao Dong

Results 129 comments of Xiaochao Dong

@roidelapluie already in the test, run this `TestTombstonesGetWithCopy` on the main branch will fail.

@codesome please take another look. I have found another bug because of the int64 overflow, see d42762f6b7c45f4e9de99056b25d1e3ad76c686a

@jesusvazquez @codesome please take a look.

I found the race issue while reading the code in an attempt to understand certain query logic, and the overflow issue was discovered while writing the test case.

This PR is optimizing the cases like this: ```yaml - action: replace target: contains_no_variables replacement: contains_no_variables separator: ; // the default regex: (.*) // the default ``` this add an...

This is a quick hack, and there might be a more prevalent scenario that we could address.

> What is the significance of looking for `$` ? ~~I think you might be right, there is no need to look for `$`.~~

@roidelapluie [this commit check the new line in the target](https://github.com/prometheus/prometheus/pull/12180/commits/3d981c8e2cedf19f1339b626252d9eed2453a1c5)

@roidelapluie I believe that after a successful replacement, the invalid label will be dropped https://github.com/prometheus/prometheus/blob/fe639b545fa8564cf3ea57a7a0b815e432ab7aed/model/relabel/relabel.go#L263-L267

@bboreham great explanation, I think I was somewhat confused before. After some experiments, I believe the SourceLabels don't really matter either, since the default regex is `(.*)`. Therefore, it seems...