Skip to content

Commit

Permalink
storage: fix setting of compression algorithm
Browse files Browse the repository at this point in the history
Fix an issue where the compression cluster setting is being set on a
copy of the per-level configuration, rather than the configuration that
is ultimately passed to Pebble.

Touches #123953.

Release note: None.
  • Loading branch information
nicktrav committed May 18, 2024
1 parent b235843 commit 7da38b0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/storage/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -1081,8 +1081,8 @@ func newPebble(ctx context.Context, cfg engineConfig) (p *Pebble, err error) {
cfg.opts.FS = cfg.env
cfg.opts.Lock = cfg.env.DirectoryLock
cfg.opts.ErrorIfNotExists = cfg.mustExist
for _, l := range cfg.opts.Levels {
l.Compression = func() sstable.Compression {
for i := range cfg.opts.Levels {
cfg.opts.Levels[i].Compression = func() sstable.Compression {
return getCompressionAlgorithm(ctx, cfg.settings)
}
}
Expand Down

0 comments on commit 7da38b0

Please sign in to comment.