Skip to content

Commit

Permalink
Enable compression in logs WAL (#5408)
Browse files Browse the repository at this point in the history
  • Loading branch information
thepalbi authored Oct 10, 2023
1 parent 7d7b715 commit 788b6e0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
-----------------
Expand Down
2 changes: 1 addition & 1 deletion component/common/loki/wal/wal.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
Expand Down

0 comments on commit 788b6e0

Please sign in to comment.