You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the constructor for Pebble DB, it's impossible to set any of the useful pebble db options. In particular, this makes it impossible to open the database in read only mode, which is required to be able to safely read information without accidentally tampering anything.
funcNewPebbleDB(namestring, dirstring, optsOptions) (DB, error) {
do:=&pebble.Options{
Logger: &fatalLogger{}, // pebble info logs are messing up the logs (not a cosmossdk.io/log logger)MaxConcurrentCompactions: func() int { return3 }, // default 1
}
do.EnsureDefaults()
ifopts!=nil {
files:=cast.ToInt(opts.Get("maxopenfiles"))
iffiles>0 {
do.MaxOpenFiles=files
}
}
dbPath:=filepath.Join(dir, name+DBFileSuffix)
p, err:=pebble.Open(dbPath, do)
iferr!=nil {
returnnil, err
}
return&PebbleDB{
db: p,
}, err
}
In the constructor for Pebble DB, it's impossible to set any of the useful pebble db options. In particular, this makes it impossible to open the database in read only mode, which is required to be able to safely read information without accidentally tampering anything.
Can we change it to the following?
The text was updated successfully, but these errors were encountered: