Skip to content

Commit

Permalink
Merge pull request #85 from turbofish-org/lock-fix
Browse files Browse the repository at this point in the history
Change `open_and_get_aux` to open DB in readonly mode
  • Loading branch information
mappum authored Nov 16, 2024
2 parents 97fca3d + a914255 commit 7d04e7f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/merk/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,8 @@ impl Merk {
P: AsRef<Path>,
{
let db_opts = Merk::default_db_opts();
let db = rocksdb::DB::open_cf_descriptors(&db_opts, path, column_families())?;
let db =
rocksdb::DB::open_cf_descriptors_read_only(&db_opts, path, column_families(), false)?;
let aux_cf = db.cf_handle(AUX_CF_NAME).unwrap();
Ok(db.get_cf(aux_cf, key)?)
}
Expand Down

0 comments on commit 7d04e7f

Please sign in to comment.