Skip to content
This repository has been archived by the owner on Aug 13, 2019. It is now read-only.

Commit

Permalink
WAL compression enabled by default
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Marchbanks <csmarchbanks@gmail.com>
  • Loading branch information
csmarchbanks committed May 20, 2019
1 parent 0d2d530 commit 83ac0d2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions db.go
Expand Up @@ -81,8 +81,8 @@ type Options struct {
// This in-turn enables vertical compaction and vertical query merge.
AllowOverlappingBlocks bool

// WALCompression will turn on Snappy compression for records on the WAL.
WALCompression bool
// DisableWALCompression will turn off Snappy compression for records on the WAL.
DisableWALCompression bool
}

// Appender allows appending a batch of data. It must be completed with a
Expand Down Expand Up @@ -303,7 +303,7 @@ func Open(dir string, l log.Logger, r prometheus.Registerer, opts *Options) (db
if opts.WALSegmentSize > 0 {
segmentSize = opts.WALSegmentSize
}
wlog, err = wal.NewSize(l, r, filepath.Join(dir, "wal"), segmentSize, opts.WALCompression)
wlog, err = wal.NewSize(l, r, filepath.Join(dir, "wal"), segmentSize, !opts.DisableWALCompression)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit 83ac0d2

Please sign in to comment.