File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -68,14 +68,14 @@ impl BrainDb {
6868 let conn = Connection :: open ( & db_path)
6969 . map_err ( |e| DbError ( format ! ( "open {}: {e}" , db_path. display( ) ) ) ) ?;
7070
71- // iSH-optimised PRAGMAs:
72- // WAL + NORMAL sync: durable and 2× faster writes on constrained flash .
73- // mmap 8 MiB: let OS page-cache serve hot reads without extra copies .
71+ // iSH-compatible PRAGMAs:
72+ // TRUNCATE is safer on iSH's emulated filesystem .
73+ // Disable mmap entirely to avoid uncatchable I/O errors and memory pressure .
7474 // temp_store MEMORY: temp tables never hit slow iSH storage.
7575 conn. execute_batch (
76- "PRAGMA journal_mode = WAL ;
76+ "PRAGMA journal_mode = TRUNCATE ;
7777 PRAGMA synchronous = NORMAL;
78- PRAGMA mmap_size = 8388608 ;
78+ PRAGMA mmap_size = 0 ;
7979 PRAGMA temp_store = MEMORY;" ,
8080 ) ?;
8181
You can’t perform that action at this time.
0 commit comments