Skip to content

Commit

Permalink
Merge PR: rocksdb config opt (#1522)
Browse files Browse the repository at this point in the history
* rocksdb config opt

* rocksdb config opt

Co-authored-by: Ben <[email protected]>
Co-authored-by: xiangjianmeng <[email protected]>
  • Loading branch information
3 people authored Jan 30, 2022
1 parent 2162ce3 commit fd18cf0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions libs/tm-db/rocksdb.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,15 +87,13 @@ func NewRocksDB(name string, dir string) (*RocksDB, error) {
opts.SetMaxOpenFiles(maxOpenFiles)
}

opts.SetAllowMmapReads(true)
opts.SetAllowMmapReads(false)
if v, ok := params[mmapRead]; ok {
enable, err := strconv.ParseBool(v)
if err != nil {
panic(fmt.Sprintf("Invalid options parameter %s: %s", mmapRead, err))
}
if enable {
opts.SetAllowMmapReads(enable)
}
opts.SetAllowMmapReads(enable)
}

if v, ok := params[mmapWrite]; ok {
Expand Down

0 comments on commit fd18cf0

Please sign in to comment.