VictoriaMetrics/lib/encoding
Aliaksandr Valialkin 051e722112
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:07:49 +03:00
..
zstd all: add go:build lines for Go1.17 2021-07-26 15:50:46 +03:00
compress_test.go lib/encoding: substitute CompressZSTD with CompressZSTDLevel 2019-05-24 12:32:49 +03:00
compress.go lib: dump compressed block contents on error during decompression 2020-08-15 14:51:14 +03:00
encoding_cgo_test.go all: add go:build lines for Go1.17 2021-07-26 15:50:46 +03:00
encoding_pure_test.go all: add go:build lines for Go1.17 2021-07-26 15:50:46 +03:00
encoding_test.go lib/{encoding,decimal}: typo fixes in tests: epxecting->expecting 2020-04-28 00:02:19 +03:00
encoding_timing_test.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:33:46 +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:07:49 +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:33:46 +03:00
int.go lib/encoding: explicitly set slice length passed to binary.BigEndian.Uint* 2022-04-12 12:56:52 +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:33:46 +03:00
nearest_delta2.go all: use %w instead of %s for wrapping errors in fmt.Errorf 2020-06-30 23:33:46 +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:33:46 +03:00
nearest_delta.go lib/encoding: substitute 64-bits.LeadingZeros64() with bits.Len64() 2022-02-01 11:20:20 +02:00