From 788b6e0ba5e57bba8f5d4763e944fffb27e14bcb Mon Sep 17 00:00:00 2001 From: Pablo <2617411+thepalbi@users.noreply.github.com> Date: Tue, 10 Oct 2023 10:17:15 -0300 Subject: [PATCH] Enable compression in logs WAL (#5408) --- CHANGELOG.md | 4 ++++ component/common/loki/wal/wal.go | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f6d9777c3d21..1f13d08614b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -19,6 +19,10 @@ Main (unreleased) - Fixed an issue where `loki.process` validation for stage `metric.counter` was allowing invalid combination of configuration options. (@thampiotr) + +### Enhancements + +- The `loki.write` WAL now has snappy compression enabled by default. (@thepalbi) v0.37.0 (2023-10-10) ----------------- diff --git a/component/common/loki/wal/wal.go b/component/common/loki/wal/wal.go index 384e98235e6d..67a6e83a8ea2 100644 --- a/component/common/loki/wal/wal.go +++ b/component/common/loki/wal/wal.go @@ -37,7 +37,7 @@ type wrapper struct { func New(cfg Config, log log.Logger, registerer prometheus.Registerer) (WAL, error) { // TODO: We should fine-tune the WAL instantiated here to allow some buffering of written entries, but not written to disk // yet. This will attest for the lack of buffering in the channel Writer exposes. - tsdbWAL, err := wlog.NewSize(log, registerer, cfg.Dir, wlog.DefaultSegmentSize, wlog.CompressionNone) + tsdbWAL, err := wlog.NewSize(log, registerer, cfg.Dir, wlog.DefaultSegmentSize, wlog.CompressionSnappy) if err != nil { return nil, fmt.Errorf("failde to create tsdb WAL: %w", err) }