mirror of
https://github.com/VictoriaMetrics/VictoriaMetrics.git
synced 2026-05-17 08:36:55 +03:00
Ensure proper expansion and reset of `buf` size for OpenTelemetry ingestion. This pull request does: 1. Flush data in `wctx` when `buf` is over 4MiB. 2. Do not return `wctx` with `buf` larger than 4MiB while the actual in-use length is less than 1MiB to the pool. Previously, when a small number of requests carried a large volume of time series or labels, `buf` was over-expanded and recycled to the pool, resulting in an excessive memory usage issue. fixes https://github.com/VictoriaMetrics/VictoriaMetrics/issues/10378