linxGnu / grocksdb

RocksDB wrapper for Go. Support 9.x, 8.x, 7.x, 6.x, etc
MIT License
315 stars 68 forks source link

`options.SetPrefixExtractor(grocksdb.NewNoopPrefixTransform())` maybe coredump #121

Closed meilihao closed 1 year ago

meilihao commented 1 year ago

code:

package main

import (
    "os"

    "github.com/linxGnu/grocksdb"
)

func main() {
    dir, err := os.MkdirTemp(".", "t-")
    CheckErr(err)

    options := grocksdb.NewDefaultOptions()
    options.SetCreateIfMissing(true)
    options.SetPrefixExtractor(grocksdb.NewNoopPrefixTransform())

    db, err := grocksdb.OpenDb(options, dir)
    CheckErr(err)

    db.Close()
    options.Destroy()
}

func CheckErr(err error) {
    if err != nil {
        panic(err)
    }
}

result:

linxGnu commented 1 year ago

@meilihao Please report this issue to https://github.com/facebook/rocksdb instead.

As grocksdb is rocksdb wrapper. This issue happens underlying.

meilihao commented 1 year ago

https://github.com/facebook/rocksdb/issues/1095 skip to destroy opts.cst