CreateColumnFamily Throw Null access Exception
Closed this issue · 1 comments
mhorse8 commented
{
using var db1 = RocksDb.Open(new DbOptions().SetCreateIfMissing(true), dbPath);
db1.CreateColumnFamily(new ColumnFamilyOptions(), "test");// throw exception
}
mhorse8 commented
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());
}