VictoriaMetrics/lib/protoparser
Aliaksandr Valialkin 86fd89e524
lib/protoparser/promremotewrite: fall back to Snappy decoding if zstd decoding fails
This case is possible after the following steps:

1. vmagent tries to perform handshake with the -remoteWrite.url in order to determine whether
   the remote storage supports zstd-compressed data.
2. The remote storage is unavailable during the handshake. In this case vmagent falls back to Snappy compression
   for the data sent to the remote storage.
3. vmagent compresses the collected data into blocks with Snappy and puts these blocks to persistent queue on disk.
4. The remote storage becomes available.
5. vmagent restarts, performs the handshake with the remote storage and detects that it supports zstd-compressed data.
6. vmagent starts sending Snappy-compressed data from persistent queue to the remote storage,
   while falsely advertizing it sends zstd-compressed data.
7. The remote storage receives Snappy-compressed data and fails unpacking it with zstd.

The solution is to just fall back to Snappy decompression if zstd decompression fails.

Updates https://github.com/VictoriaMetrics/VictoriaMetrics/issues/5301
2023-11-13 21:26:55 +01:00
..
common Makefile: update golangci-lint from v1.51.2 to v1.54.2 2023-09-01 11:12:12 +02:00
csvimport lib/protoparser/csvimport: properly parse the last empty column in CSV line 2023-05-12 15:51:41 -07:00
datadog lib/protoparser/influx: extract stream parsing code into a separate stream package 2023-02-13 09:58:52 -08:00
graphite lib/protoparser/graphite: extract stream parsing code into a separate stream package 2023-02-13 10:32:36 -08:00
influx lib/protoparser/influx: extract stream parsing code into a separate stream package 2023-02-13 09:58:52 -08:00
native/stream lib/protoparser/native: extract stream parsing code into a separate stream package 2023-02-13 10:43:05 -08:00
opentelemetry lib/protoparser/openetelemetry: fixes panic (#4821) 2023-08-12 05:09:18 -07:00
opentsdb lib/protoparser/opentsdb: extract stream parsing code into a separate stream package 2023-02-13 10:03:16 -08:00
opentsdbhttp lib/opentsdbhttp: fix a typo preventing from using writeconcurrencylimiter (#4208) 2023-04-27 09:22:42 +02:00
prometheus lib/promutils: properly return error when incorrect Prometheus label names are passed to NewLabelsFromString() 2023-05-12 16:52:29 -07:00
promremotewrite/stream lib/protoparser/promremotewrite: fall back to Snappy decoding if zstd decoding fails 2023-11-13 21:26:55 +01:00
vmimport lib/protoparser/vmimport: extract stream parsing code into a separate stream package 2023-02-13 10:20:19 -08:00