Change SQLite journal mode from WAL to DELETE in blockchain node database configuration
Some checks failed
Integration Tests / test-service-integration (push) Has been cancelled
Python Tests / test-python (push) Has been cancelled
Security Scanning / security-scan (push) Has been cancelled

- Update PRAGMA journal_mode from WAL to DELETE in set_sqlite_pragma
- Addresses filesystem permission issues with WAL mode in containerized environments
This commit is contained in:
aitbc
2026-04-15 08:58:56 +02:00
parent faf1ca996c
commit 657c320ab4

View File

@@ -24,7 +24,7 @@ _engine = create_engine(f"sqlite:///{settings.db_path}", echo=False)
@event.listens_for(_engine, "connect")
def set_sqlite_pragma(dbapi_connection, connection_record):
cursor = dbapi_connection.cursor()
cursor.execute("PRAGMA journal_mode=WAL")
cursor.execute("PRAGMA journal_mode=DELETE")
cursor.execute("PRAGMA synchronous=NORMAL")
cursor.execute("PRAGMA cache_size=-64000")
cursor.execute("PRAGMA temp_store=MEMORY")