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

Open
2 tasks
jpraynaud opened this issue May 22, 2024 · 0 comments · May be fixed by #1791
Open
2 tasks

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

jpraynaud opened this issue May 22, 2024 · 0 comments · May be 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

  • Execute the command PRAGMA wal_checkpoint(SQLITE_CHECKPOINT_TRUNCATE); in the ConnectionBuilder with WAL enabled connections (in aggregator)
  • Maybe handle the connections to the database differently to allow for truncating the WAL file when the connection is refreshed?
@jpraynaud jpraynaud added the performances 🥇 Performances label May 22, 2024
@Alenar Alenar linked a pull request Jun 28, 2024 that will close this issue
12 tasks
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