Enable sync mode for paritydb (#7961)

This commit is contained in:
Arkadiy Paronyan
2021-01-24 20:45:08 +03:00
committed by GitHub
parent 878f7ccf6e
commit 7aec46257f
+1
View File
@@ -37,6 +37,7 @@ pub fn open<H: Clone>(path: &std::path::Path, db_type: DatabaseType)
-> parity_db::Result<std::sync::Arc<dyn Database<H>>>
{
let mut config = parity_db::Options::with_columns(path, NUM_COLUMNS as u8);
config.sync = true; // Flush each commit
if db_type == DatabaseType::Full {
let mut state_col = &mut config.columns[columns::STATE as usize];
state_col.ref_counted = true;