O_DIRECT disable on WAL

This commit is contained in:
Pere Diaz Bou 2024-11-13 13:45:42 +00:00
parent 94a45eab9e
commit e2276c2e9d
10 changed files with 31 additions and 17 deletions

View file

@ -65,7 +65,7 @@ pub struct Database {
impl Database {
#[cfg(feature = "fs")]
pub fn open_file(io: Arc<dyn IO>, path: &str) -> Result<Rc<Database>> {
let file = io.open_file(path, io::OpenFlags::None)?;
let file = io.open_file(path, io::OpenFlags::None, true)?;
let page_io = Rc::new(FileStorage::new(file));
let wal_path = format!("{}-wal", path);
let db_header = Pager::begin_open(page_io.clone())?;