SQLite: fsync db.sqlite-shm before opening the database#13826
Merged
roberth merged 1 commit intoNixOS:masterfrom Aug 25, 2025
Merged
SQLite: fsync db.sqlite-shm before opening the database#13826roberth merged 1 commit intoNixOS:masterfrom
roberth merged 1 commit intoNixOS:masterfrom
Conversation
e75c11e to
8f8baa7
Compare
roberth
approved these changes
Aug 25, 2025
src/libstore/sqlite.cc
Outdated
| { | ||
| // Work around a ZFS issue where SQLite's truncate() call on | ||
| // db.sqlite-shm can randomly take up to a few seconds. See | ||
| // https://github.com/openzfs/zfs/issues/14290#issuecomment-3074672917. |
Member
There was a problem hiding this comment.
Suggested change
| // https://github.com/openzfs/zfs/issues/14290#issuecomment-3074672917. | |
| // https://github.com/openzfs/zfs/issues/14290#issuecomment-3074672917. | |
| // Remove this workaround when a fix is widely installed, perhaps 2027? Candidate: | |
| // https://github.com/search?q=repo%3Aopenzfs%2Fzfs+%22Linux%3A+zfs_putpage%3A+complete+async+page+writeback+immediately%22&type=commits |
idk about their merging / branches / rebasing, so I opted for a search URL
Member
|
I'm dogfooding this, and it solves the problem! |
This is a workaround for NixOS#13515 (opening the SQLite DB randomly taking a couple of seconds on ZFS). (cherry picked from commit a7fceb5)
8f8baa7 to
e492c64
Compare
mergify bot
added a commit
that referenced
this pull request
Aug 25, 2025
…3826 SQLite: fsync db.sqlite-shm before opening the database (backport #13826)
|
This pull request has been mentioned on NixOS Discourse. There might be relevant details there: https://discourse.nixos.org/t/2025-08-25-nix-team-meeting-minutes-243/68497/1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
This is a workaround for #13515 (opening the SQLite DB randomly taking a couple of seconds on ZFS).
(cherry picked from commit a7fceb5)
Context
Helps with #13515 and #13515 (comment)
Add 👍 to pull requests you find important.
The Nix maintainer team uses a GitHub project board to schedule and track reviews.