Skip to content

Commit

Permalink
test WAL
Browse files Browse the repository at this point in the history
Signed-off-by: Yadong Ding <[email protected]>
  • Loading branch information
Desiki-high committed Oct 11, 2024
1 parent 41adbf5 commit ba34f73
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion storage/src/cache/dedup/db.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@ impl CasDb {

pub fn from_file(db_path: impl AsRef<Path>) -> Result<CasDb> {
let mgr = SqliteConnectionManager::file(db_path)
.with_flags(OpenFlags::SQLITE_OPEN_CREATE | OpenFlags::SQLITE_OPEN_READ_WRITE);
.with_flags(OpenFlags::SQLITE_OPEN_CREATE | OpenFlags::SQLITE_OPEN_READ_WRITE)
.with_init(|c| c.execute_batch("PRAGMA journal_mode = WAL"));
let pool = r2d2::Pool::new(mgr)?;
let conn = pool.get()?;

Expand Down

0 comments on commit ba34f73

Please sign in to comment.