Skip to content

Commit

Permalink
Merge #124388
Browse files Browse the repository at this point in the history
124388: storage: fix setting of compression algorithm r=aadityasondhi a=nicktrav

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.

Epic: CRDB-37583

Co-authored-by: Nick Travers <[email protected]>
  • Loading branch information
craig[bot] and nicktrav committed May 21, 2024
2 parents d146ecf + 7f7d9f6 commit 64592a7
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 @@ -1080,8 +1080,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 64592a7

Please sign in to comment.