Skip to content

Commit c9451a1

Browse files
committed
storage/metamorphic: increase min bound of target file size
When the target file size is less than an empty table writer, we try to split the table as soon as possible (and emit just a small piece of a span in many cases). These many tiny tables slow down the tests a lot, to the point of timing out certain operations. This change sets the minimum target file size in the metamorphic tests to 570 as the estimated size of an empty column writer is 565. Epic: none Fixes: #156842 Release note: None
1 parent 9d2b6d9 commit c9451a1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/storage/metamorphic/options.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ func randomOptions() *pebble.Options {
114114
opts.Levels[0].BlockSize = 1 << rngIntRange(rng, 1, 20)
115115
opts.Levels[0].BlockSizeThreshold = int(rngIntRange(rng, 50, 100))
116116
opts.Levels[0].IndexBlockSize = opts.Levels[0].BlockSize
117-
opts.TargetFileSizes[0] = 1 << rngIntRange(rng, 1, 20)
117+
opts.TargetFileSizes[0] = int64(max(1<<rngIntRange(rng, 9, 20), 570))
118118
for i := 1; i < len(opts.Levels); i++ {
119119
opts.Levels[i] = opts.Levels[i-1]
120120
opts.TargetFileSizes[i] = opts.TargetFileSizes[i-1] * 2

0 commit comments

Comments
 (0)