Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLite WAL files are not truncated in signer and aggregator #1707

Closed
2 of 3 tasks
jpraynaud opened this issue May 22, 2024 · 0 comments · Fixed by #1791
Closed
2 of 3 tasks

SQLite WAL files are not truncated in signer and aggregator #1707

jpraynaud opened this issue May 22, 2024 · 0 comments · Fixed by #1791
Assignees
Labels
performances 🥇 Performances

Comments

@jpraynaud
Copy link
Member

jpraynaud commented May 22, 2024

Why

The WAL files produced by SQLite are constantly growing whereas the should be truncated automatically:

  • Example file size on release-mainnet:
174604288 aggregator.sqlite3
327680 aggregator.sqlite3-shm
163390992 aggregator.sqlite3-wal
  • Example file size on testing-mainnet:
31645708288 cardano-transaction.sqlite3
425984 cardano-transaction.sqlite3-shm
30943029312 cardano-transaction.sqlite3-wal

What

Make the WAL files automatically truncated.

How

For signer & aggregator add a (repeating?) task that:

  • Execute the command PRAGMA wal_checkpoint(SQLITE_CHECKPOINT_TRUNCATE);
  • Vacuum the databases ? (not the cardano_transaction database on aggregator as it can be very large).
  • Maybe handle the connections to the database differently to allow for truncating the WAL file when the connection is refreshed?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
performances 🥇 Performances
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants