Skip to content

Commit

Permalink
Merge #45361
Browse files Browse the repository at this point in the history
45361: storage/engine: add Pebble support for "rocksdb.min_wal_sync_interval" r=petermattis a=petermattis

Hook up "rocksdb.min_wal_sync_interval" to
`pebble.Options.WALMinSyncInterval`. The Pebble support for
`WALMinSyncInterval` is currently buggy and will be fixed by
cockroachdb/pebble#551.

Release note: None

Co-authored-by: Peter Mattis <[email protected]>
  • Loading branch information
craig[bot] and petermattis committed Feb 25, 2020
2 parents 0a31f12 + 5be9306 commit e6bd3bf
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pkg/storage/engine/pebble.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ import (
"io/ioutil"
"os"
"sort"
"time"

"github.com/cockroachdb/cockroach/pkg/base"
"github.com/cockroachdb/cockroach/pkg/roachpb"
Expand Down Expand Up @@ -366,6 +367,11 @@ func NewPebble(ctx context.Context, cfg PebbleConfig) (*Pebble, error) {
// cfg.FS and cfg.ReadOnly later on.
cfg.Opts.EnsureDefaults()
cfg.Opts.ErrorIfNotExists = cfg.MustExist
if settings := cfg.Settings; settings != nil {
cfg.Opts.WALMinSyncInterval = func() time.Duration {
return minWALSyncInterval.Get(&settings.SV)
}
}

var auxDir string
if cfg.Dir == "" {
Expand Down

0 comments on commit e6bd3bf

Please sign in to comment.