store: synchronous=NORMAL (a newcomer's catch-up 2.4x faster); memory measured with a 50,000-listing database and 30 real nodes

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-19 08:32:28 +01:00
co-authored by Claude Sonnet 5.5
parent 1f1f649800
commit 46bf7faf2a
3 changed files with 28 additions and 3 deletions
+1 -1
View File
@@ -215,7 +215,7 @@ CREATE TABLE IF NOT EXISTS addresses (
// Open opens (creating if needed) the database at path. Use ":memory:" for
// an ephemeral store.
func Open(path string, opt Options) (*Store, error) {
dsn := "file:" + path + "?_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)"
dsn := "file:" + path + "?_pragma=busy_timeout(5000)&_pragma=journal_mode(WAL)&_pragma=synchronous(NORMAL)"
if path == ":memory:" {
dsn = "file::memory:?_pragma=busy_timeout(5000)"
}