You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The database would remain in a working state on the network filesystem AFS.
What happened?
Pretty regularly the database would get corrupt causing atuin to panic when retrieving history (up arrow).
(I don't have an example anymore since I have been using a patched version (a fork) that fixes the issue for a while)
After taking a look on the sqlite docs it looks like this can be mitigated by using a rollback mode (recommendation 3). https://www.sqlite.org/useovernet.html. These include "DELETE", "PERSIST", or "TRUNCATE".
I tried changing the database files from WAL (write-ahead log) to DELETE however the the default behavior of atuin is to overwrite this and change it back to WAL on access.
I tested removing these two lines in a fork that I compiled and manually changed the database files to DELETE and they have been corruption free for a couple weeks so I am fairly confident that did indeed fix my issues. https://github.com/budde25/atuin
It would be great if the database files were not forced onto WAL so that manually changing them would keep them working on AFS or adding an option to the config such as "Network Filesystem Support" that would default them to a rollback mode instead of WAL on access.
I would be happy to make a patch to remove the forced change to the mode to WAL on database access (while still creating in WAL mode if file doesn't exist).
That would require minimal changes to any code and allow me to mitigate by just manually changing my database files after atuin's initial creation.
What did you expect to happen?
The database would remain in a working state on the network filesystem AFS.
What happened?
Pretty regularly the database would get corrupt causing atuin to panic when retrieving history (up arrow).
(I don't have an example anymore since I have been using a patched version (a fork) that fixes the issue for a while)
After taking a look on the sqlite docs it looks like this can be mitigated by using a rollback mode (recommendation 3). https://www.sqlite.org/useovernet.html. These include "DELETE", "PERSIST", or "TRUNCATE".
I tried changing the database files from WAL (write-ahead log) to DELETE however the the default behavior of atuin is to overwrite this and change it back to WAL on access.
atuin/crates/atuin-client/src/database.rs
Line 141 in ea991d5
atuin/crates/atuin-client/src/record/sqlite_store.rs
Line 44 in ea991d5
I tested removing these two lines in a fork that I compiled and manually changed the database files to DELETE and they have been corruption free for a couple weeks so I am fairly confident that did indeed fix my issues.
https://github.com/budde25/atuin
It would be great if the database files were not forced onto WAL so that manually changing them would keep them working on AFS or adding an option to the config such as "Network Filesystem Support" that would default them to a rollback mode instead of WAL on access.
Atuin doctor output
Code of Conduct
The text was updated successfully, but these errors were encountered: