Skip to content

Commit

Permalink
metamorphic: vary sstable compression algorithm
Browse files Browse the repository at this point in the history
In the metamorphic test runs with randomized options, vary the sstable
compression algorithm rather than always using the default Snappy compression
algorithm.

Close #1705.
  • Loading branch information
jbowens committed Sep 15, 2023
1 parent c91e879 commit 336c997
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions metamorphic/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -488,6 +488,15 @@ func randomOptions(
default:
lopts.FilterPolicy = newTestingFilterPolicy(1 << rng.Intn(5))
}
// We use either no compression, snappy compression or zstd compression.
switch rng.Intn(3) {
case 0:
lopts.Compression = pebble.NoCompression
case 1:
lopts.Compression = pebble.ZstdCompression
default:
lopts.Compression = pebble.SnappyCompression
}
opts.Levels = []pebble.LevelOptions{lopts}

// Explicitly disable disk-backed FS's for the random configurations. The
Expand Down

0 comments on commit 336c997

Please sign in to comment.