feat(memory): add sqlite_journal_mode config for shared filesystem support
SQLite WAL mode requires shared-memory (mmap/shm) which is unavailable on many network and virtual shared filesystems (NFS, SMB/CIFS, UTM/VirtioFS, VirtualBox shared folders), causing xShmMap I/O errors at startup. Add `sqlite_journal_mode` config option under `[memory]` that accepts "wal" (default) or "delete". When set to "delete", SQLite uses the legacy DELETE journal mode and disables mmap, allowing ZeroClaw to run with workspaces on shared/network filesystems. Usage: [memory] sqlite_journal_mode = "delete" Changes: - config/schema.rs: Add sqlite_journal_mode field to MemoryConfig - memory/sqlite.rs: Add with_options() supporting journal mode selection - memory/mod.rs: Pass journal_mode from config to SqliteMemory - onboard/wizard.rs: Include new field in default MemoryConfig
This commit is contained in:
+2
-1
@@ -262,13 +262,14 @@ pub fn create_memory_with_storage_and_routes(
|
||||
));
|
||||
|
||||
#[allow(clippy::cast_possible_truncation)]
|
||||
let mem = SqliteMemory::with_embedder(
|
||||
let mem = SqliteMemory::with_options(
|
||||
workspace_dir,
|
||||
embedder,
|
||||
config.vector_weight as f32,
|
||||
config.keyword_weight as f32,
|
||||
config.embedding_cache_size,
|
||||
config.sqlite_open_timeout_secs,
|
||||
&config.sqlite_journal_mode,
|
||||
)?;
|
||||
Ok(mem)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user