George Krajcsovits 7d7b9eacff
Fix int32 overflow issues (#12978)
On a 32 bit architecture the size of int is 32 bits. Thus converting from
int64, uint64 can overflow it and flip the sign.

Try for yourself in playground:
package main

import "fmt"

func main() {
	x := int64(0x1F0000001)
	y := int64(1)
	z := int32(x - y) // numerically this is 0x1F0000000
	fmt.Printf("%v\n", z)
}

Prints -268435456 as if x was smaller.

Followup to #12650

Signed-off-by: György Krajcsovits <gyorgy.krajcsovits@grafana.com>
2023-10-16 16:23:26 +02:00
..
2023-10-16 16:23:26 +02:00
2023-09-21 22:53:51 +02:00
2021-02-22 20:28:02 +01:00
2023-10-16 16:23:26 +02:00
2023-10-16 16:23:26 +02:00
2023-09-21 22:53:51 +02:00
2023-09-21 22:53:51 +02:00
2023-09-21 22:53:51 +02:00
2022-10-07 16:20:20 +00:00

TSDB

GoPkg

This directory contains the Prometheus TSDB (Time Series DataBase) library, which handles storage and querying of all Prometheus v2 data.

Documentation

External resources

A series of blog posts explaining different components of TSDB: