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

set durability for sqlite to recommended settings #1667

Merged
merged 1 commit into from Feb 4, 2024

Conversation

nebkor
Copy link
Contributor

@nebkor nebkor commented Feb 2, 2024

On my ZFS system, commands were being blocked by history insertion due to FULL durability being enabled by default in SQLx for the WAL, sometimes for over a second, but at least half the time there was at least 500ms before the command was run. According to the documentation, NORMAL is recommended.

With this change, my terminal commands are no longer being blocked.

Checks

  • [x ] I am happy for maintainers to push small adjustments to this PR, to speed up the review cycle
  • [ x] I have checked that there are no existing pull requests for the same thing

Also do an optimize on connection close. Fixes lag on history insertion.
@ellie
Copy link
Member

ellie commented Feb 4, 2024

I'm hesitant due to

A transaction committed in WAL mode with synchronous=NORMAL might roll back following a power loss or system crash.

but I think that seems reasonable for now. once #1661 is complete we can do always change back to full with no issues.

Copy link
Member

@ellie ellie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

Seeing as this is your first time contributing, if you would like a holographic contributors-only Atuin sticker, then please fill out this form!

We do also have a Discord if you'd like to ask any questions, or just fancy hanging out!

@ellie ellie merged commit b7bb583 into atuinsh:main Feb 4, 2024
9 checks passed
@ellie
Copy link
Member

ellie commented Feb 4, 2024

ref #952

@nebkor
Copy link
Contributor Author

nebkor commented Feb 4, 2024

Thank you so much!

nebkor added a commit to nebkor/atuin that referenced this pull request Mar 24, 2024
Just like atuinsh#1667, when connecting to a DB using WAL mode for journaling, the recommended setting for
synchronizing the data "NORMAL", while the default is "FULL", which causes hangs on ZFS systems.

The hangs are not as long or frequent as before atuinsh#1667, but are still present.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants