Restore create_if_missing to RocksDB code

This commit is contained in:
Luke Parker 2023-07-25 23:00:10 -04:00
parent 3862731a12
commit 821f5d8de4
No known key found for this signature in database

View file

@ -36,6 +36,7 @@ impl<T: ThreadMode + 'static> Db for Arc<TransactionDB<T>> {
pub type RocksDB = Arc<TransactionDB<SingleThreaded>>;
pub fn new_rocksdb(path: &str) -> RocksDB {
let mut options = Options::default();
options.create_if_missing(true);
options.set_compression_type(DBCompressionType::Zstd);
Arc::new(TransactionDB::open(&options, &Default::default(), path).unwrap())
}