VictoriaMetrics/lib/encoding
Aliaksandr Valialkin 5fa9525498
lib/storage: verify that timestamps in block are in the range specified by blockHeader.{Min,Max}Timestamp when upacking the block
This should reduce chances of unnoticed on-disk data corruption.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/2998
Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/3011

This change modifies the format for data exported via /api/v1/export/native -
now this data contains MaxTimestamp and PrecisionBits fields from blockHeader.

This is OK, since the native export format is undocumented.
2022-09-06 13:08:09 +03:00
..
zstd all: add go:build lines for Go1.17 2021-07-26 15:48:21 +03:00
compress_test.go lib/encoding: substitute CompressZSTD with CompressZSTDLevel 2019-05-24 12:32:55 +03:00
compress.go lib: dump compressed block contents on error during decompression 2020-08-15 14:44:33 +03:00
encoding_cgo_test.go all: add go:build lines for Go1.17 2021-07-26 15:48:21 +03:00
encoding_pure_test.go all: add go:build lines for Go1.17 2021-07-26 15:48:21 +03:00
encoding_test.go lib/{encoding,decimal}: typo fixes in tests: epxecting->expecting 2020-04-28 00:01:55 +03:00
encoding_timing_test.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:05:11 +03:00
encoding.go lib/storage: verify that timestamps in block are in the range specified by blockHeader.{Min,Max}Timestamp when upacking the block 2022-09-06 13:08:09 +03:00
int_test.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
int_timing_test.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:05:11 +03:00
int.go lib/encoding: explicitly set slice length passed to binary.BigEndian.Uint* 2022-04-12 12:55:21 +03:00
nearest_delta2_test.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
nearest_delta2_timing_test.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:05:11 +03:00
nearest_delta2.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:05:11 +03:00
nearest_delta_test.go all: open-sourcing single-node version 2019-05-23 00:18:06 +03:00
nearest_delta_timing_test.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:05:11 +03:00
nearest_delta.go lib/encoding: substitute 64-bits.LeadingZeros64() with bits.Len64() 2022-01-31 23:36:48 +02:00