File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -666,17 +666,11 @@ var ConfigureForSharedStorage func(opts *pebble.Options, storage remote.Storage)
666666// Direct users of NewPebble: cfs.opts.{Logger,LoggerAndTracer} must not be
667667// set.
668668func newPebble (ctx context.Context , cfg engineConfig ) (p * Pebble , err error ) {
669- if cfg .opts == nil {
670- cfg .opts = DefaultPebbleOptions ()
671- } else {
672- // Open also causes DefaultPebbleOptions before calling NewPebble, so we
673- // are tolerant of Logger being set to pebble.DefaultLogger.
674- if cfg .opts .Logger != nil && cfg .opts .Logger != pebble .DefaultLogger {
675- return nil , errors .AssertionFailedf ("Options.Logger is set to unexpected value" )
676- }
677- // Clone the given options so that we are free to modify them.
678- cfg .opts = cfg .opts .Clone ()
669+ if cfg .opts .Logger != nil {
670+ return nil , errors .AssertionFailedf ("Options.Logger is set to unexpected value" )
679671 }
672+ // Clone the given options so that we are free to modify them.
673+ cfg .opts = cfg .opts .Clone ()
680674 if cfg .opts .FormatMajorVersion < MinimumSupportedFormatVersion {
681675 return nil , errors .AssertionFailedf (
682676 "FormatMajorVersion is %d, should be at least %d" ,
You can’t perform that action at this time.
0 commit comments