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:
@@ -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)"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user