curiosity-ai/rocksdb-sharp

CreateColumnFamily Throw Null access Exception

Closed this issue · 1 comments

{
using var db1 = RocksDb.Open(new DbOptions().SetCreateIfMissing(true), dbPath);
db1.CreateColumnFamily(new ColumnFamilyOptions(), "test");// throw exception
}

Passing in a ColumnFamilyOptions solves the problem.
if (existColumnFamilyNames.Count > 0)
_db = RocksDb.Open(dbOptions, dbPath, existColumnFamilyDescriptors);
else
{
_db = RocksDb.Open(dbOptions, dbPath, new ColumnFamilies());
}