-
-
Notifications
You must be signed in to change notification settings - Fork 4.9k
fix(db): only perform foreign key checking when a migration was applied #10397
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
fix(db): only perform foreign key checking when a migration was applied #10397
Conversation
Signed-off-by: Tommy van der Vorst <tommy@pixelspark.nl>
|
What do we do if the check fails? The transaction would be already committed at that point. Maybe it's worth tuning the migration connection instead? We scaled our settings back for regular connections, but for the migration we can be more aggressive. |
That's an interesting question but separate from this PR I think. I'm not sure what would be the right thing to do here, it is basically unrecoverable without manual intervention (i.e. removing the database).
The migration performance is fine on Apple devices, storage is quite fast, and I can show a loading screen while that happens. This change merely concerns launches where no migrations need to take place, and we do a check that will not give any useful result unless (1) a prior migration failed (in which case, see your first question :-)) or (2) the database is otherwise corrupted (which, well, has other issues). |
|
Never mind, I missed the point. I thought you wanted to move the check outside of the transaction. Applying the check only if we're in fact running a migration is the right call 👍 |
-------------------------------------------------------------------------------------- zmusic.mk 4b443225eae919c31dc99e47c4ef217a75bb1927 # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------- Use absolute path, ------------------------------------------------------------------------------------ ares.mk 2f7fa79b075ff4afed9c7f9840bab43052330aa0 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------ ld: Fix a potential out of bounds memory access in some video modes, ------------------------------------------------------------------------------------------- duckstation.mk 94efd0089f7b7907904e6fe336ca02e7dc21430b # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------------- Qt: Add fallback if system colour scheme is unknown, ------------------------------------------------------------------------------------ eden.mk 76a8a6e03926e7bcc6111f92b894fdae4d0a17ea # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------ [cmake] feat: FFmpeg CI, allow 16kb android builds, update translations for transifex (#2543) -------------------------------------------------------------------------------------- ikemen.mk 388430bb0d92a1ced3430fe102b368a911649110 # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------- Merge pull request #2686 from Jesuszilla/new-feats feat: Add option for macOS to use Command key (⌘) instead of Ctrl for hotkeys, add new controller strings to match new common gamecontrollerdb.txt entries, ----------------------------------------------------- pcsx2.mk v2.5.169 # Version: Commits on Sept 23, 2025 ----------------------------------------------------- - [GS/SW: Misc code cleanup.](PCSX2/pcsx2#13263) -------------------------------------------------------------------------------------- ppsspp.mk 4a790ebc6b93666f2b721fcdbcc4ddc959933f66 # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------- Merge pull request #20833 from hrydgard/assorted-fixes Assorted cleanups and fixes, ---------------------------------------------------------------- ruffle.mk nightly-2025-09-23 # Version: Commits on Sept 23, 2025 ---------------------------------------------------------------- ## What's Changed * avm2: Do not reference trivially copyable objects by @kjarosh in ruffle-rs/ruffle#21727 * chore: Bump `gilrs-core` to `0.6.5` by @torokati44 in ruffle-rs/ruffle#21736 * build(deps-dev): bump the npm-minor group in /web with 6 updates by @dependabot[bot] in ruffle-rs/ruffle#21743 * build(deps-dev): bump eslint-plugin-jsdoc from 57.0.10 to 60.1.1 in /web by @dependabot[bot] in ruffle-rs/ruffle#21744 * chore: Update translations from Crowdin by @kjarosh in ruffle-rs/ruffle#21747 **Full Changelog**: ruffle-rs/ruffle@nightly-2025-09-22...nightly-2025-09-23, -------------------------------------------------------------------------------------- snes9x.mk 0cb42eb1dd4c9bc2b25d6d60b7f59baa68fc0992 # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------- gtk,qt,win32: Disable dynamic rate control as default., ------------------------------------------------------------------------------------------ supermodel.mk 4e5905f9fdd5fe504b659fafe8e694b07aea6801 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------------ build.yml: Delete Supermodel.ini after running validation so it doesn't find its way into release packages, --------------------------------------------------------------------------------------------- supermodel-es.mk 546acee956ddbf3920b4384f016c2d143fac959a # Version: Commits on Sept 23, 2025 --------------------------------------------------------------------------------------------- 0.3a-4e5905f, -------------------------------------------------------------------------------------- vita3k.mk 556c2355a42517ad92bc9365ce6542b2aae39227 # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------- external: Update capstone to fix macOS CI failure, ------------------------------------------------------------------------------------------ rpi-eeprom.mk b818b44bd5bad848410ff56ed4c95868a3679786 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------------ pieeprom-2025-09-23: 2712: Fix TFTP to allow larger files (latest) * Fix TFTP to allow larger files Allow TFTP block counter to rollover to 0. See: raspberrypi/rpi-eeprom#720, ----------------------------------------------------------------------------------------- rpi-utils.mk d84dc9bd5f9eef141e5a98d5c10114a1f670e8ef # Version: Commits on Sept 12, 2025 ----------------------------------------------------------------------------------------- rpifwcrypto: Add a command to retrieve private keys Add support for a new mailbox API which returns the private key in DER form. This API will return an error if the private key is locked. Example: rpi-fw-crypto privkey --key-id 1 --out privkey.der N.B. Tidyup of buffer size defines RPI_FW_CRYPTO_PUBKEY_MAX_SIZE -> RPI_FW_CRYPTO_PUBLIC_KEY_MAX_SIZE, ---------------------------------------------------- nblood.mk r14274 # Version: Commits on Sept 23, 2025 ---------------------------------------------------- , --------------------------------------------------------------------------------------- omf2097.mk 685c4fc7560efba3052c15beaaeacf536a5aa26d # Version: Commits on Sept 23, 2025 --------------------------------------------------------------------------------------- Fix fb_scale arg in video_init/video_reinit call, -------------------------------------------------------------------------------------- tekwar.mk c2045b374184309dd0fb94706b0c3b8453f5d8bf # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------- ci: add xaudio2 dependency for msvc, ---------------------------------------------------------------------------------------- mangohud.mk be12df22f4d8a482591948024c8597a3d82523a1 # Version: Commits on Sept 23, 2025 ---------------------------------------------------------------------------------------- params: publish with atomic shared_ptr, ------------------------------------------------------------- syncthing.mk v2.0.10-rc.1 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------- ## Major changes in 2.0 - Database backend switched from LevelDB to SQLite. There is a migration on first launch which can be lengthy for larger setups. The new database is easier to understand and maintain and, hopefully, less buggy. - The logging format has changed to use structured log entries (a message plus several key-value pairs). Additionally, we can now control the log level per package, and a new log level WARNING has been inserted between INFO and ERROR (which was previously known as WARNING...). The INFO level has become more verbose, indicating the sync actions taken by Syncthing. A new command line flag `--log-level` sets the default log level for all packages, and the `STTRACE` environment variable and GUI has been updated to set log levels per package. The `--verbose` and `--logflags` command line options have been removed and will be ignored if given. - Deleted items are no longer kept forever in the database, instead they are forgotten after fifteen months. If your use case require deletes to take effect after more than a fifteen month delay, set the `--db-delete-retention-interval` command line option or corresponding environment variable to zero, or a longer time interval of your choosing. - Modernised command line options parsing. Old single-dash long options are no longer supported, e.g. `-home` must be given as `--home`. Some options have been renamed, others have become subcommands. All serve options are now also accepted as environment variables. See `syncthing --help` and `syncthing serve --help` for details. - Rolling hash detection of shifted data is no longer supported as this effectively never helped. Instead, scanning and syncing is faster and more efficient without it. - A \default folder\ is no longer created on first startup. - Multiple connections are now used by default between v2 devices. The new default value is to use three connections: one for index metadata and two for data exchange. - The following platforms unfortunately no longer get prebuilt binaries for download at syncthing.net and on GitHub, due to complexities related to cross compilation with SQLite: - dragonfly/amd64 - solaris/amd64 - linux/ppc64 - netbsd/* - openbsd/386 and openbsd/arm - windows/arm - The handling of conflict resolution involving deleted files has changed. A delete can now be the winning outcome of conflict resolution, resulting in the deleted file being moved to a conflict copy. This release is also available as: * APT repository: https://apt.syncthing.net/ * Docker image: `docker.io/syncthing/syncthing:2.0.10-rc.1` or `ghcr.io/syncthing/syncthing:2.0.10-rc.1` (`{docker,ghcr}.io/syncthing/syncthing:2` to follow just the major version) ## What's Changed ### Fixes * fix: improve conflict detection by tracking previous file hash (fixes #10349) by @calmh in syncthing/syncthing#10351 * fix(ur): properly skip zero/empty fields in report by @calmh in syncthing/syncthing#10394 * fix(gui): don't fetch usage report preview unnecessarily on GUI load by @calmh in syncthing/syncthing#10395 * fix(db): only perform foreign key checking when a migration was applied by @pixelspark in syncthing/syncthing#10397 * fix(syncthing): do not perform CPU benchmark on startup unless logging enabled by @pixelspark in syncthing/syncthing#10398 * fix(model): don't announce untrusted devices to other devices (fixes #10393) by @calmh in syncthing/syncthing#10408 * fix(sqlite): actually always insert blocks for local files (fixes #10388) by @calmh in syncthing/syncthing#10411 ### Other * build: update GitHub actions by @mrclmr in syncthing/syncthing#10399 **Full Changelog**: syncthing/syncthing@v2.0.9...v2.0.10-rc.1, ----------------------------------------------------------------------------------------- retroarch.mk 8141b31151c2cf93efabfdae2778cf8be614694f # Version: Commits on Sept 23, 2025 ----------------------------------------------------------------------------------------- Fetch translations from Crowdin, -------------------------------------------------------------------------------------- libdof.mk f7ba2e1a0953bb82bb167535f9458533c5b0a308 # Version: Commits on Sept 22, 2025 -------------------------------------------------------------------------------------- ledwiz: fix autoconfigurator from not running (#29), --------------------------------------------------------------------------------------- vpinball.mk 6d8f23de01a1a3ff1e31cd94417e310a00574474 # Version: Commits on Jul 23, 2024 --------------------------------------------------------------------------------------- misc: standalone builds for macos, ios, tvos, android, linux, and rpi, ----------------------------------------------------------------------------------------- doomretro.mk 282a0178fd31fc1e8bb9737fd7f71d893f028ce2 # Version: Commits on Sept 23, 2025 ----------------------------------------------------------------------------------------- Another fix for using mouse pointer on sliders in options menu, -------------------------------------------------------------------------------------- gzdoom.mk 376bef703321ae6a7589246aa420b03986910f45 # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------- Fix array oob, ------------------------------------------------------------------------------------ tr1x.mk dca1860a0746c022163d861190bc594708952a69 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------ tr2/objects/skidoo_driver: restore hitpoints on load This ensures dead skidoo drivers' hitpoints are set to DONT_TARGET after loading a save. Resolves #3966., ------------------------------------------------------------------------------------ tr2x.mk dca1860a0746c022163d861190bc594708952a69 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------ tr2/objects/skidoo_driver: restore hitpoints on load This ensures dead skidoo drivers' hitpoints are set to DONT_TARGET after loading a save. Resolves #3966., -------------------------------------------------------------------------------------------------------- libretro-beetle-pce-fast.mk be659edd93cd84e01e13ab3c44a6354662d37e4e # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------------------------- added vram memory access, minor optimizations for volume hacks (#236) * minor optimization: changed user_volume type to avoid unnecessary casting (#21) * minor refactoring for better performances * added vram memory access --------- Co-authored-by: eadmaster <51NMBsFda0ab1>, ---------------------------------------------------------------------------------------------------- libretro-dosbox-pure.mk 3542877b5a7f82be05fa6b9cbc5574f7ca392bfc # Version: Commits on Sept 23, 2025 ---------------------------------------------------------------------------------------------------- Reset text mode on save state loading, ------------------------------------------------------------------------------------------------------- libretro-doublecherrygb.mk 84186706ccd5298af0a576a4e07ffcec4716351e # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------------------------- Merge branch 'feature/GBCLCDforDMG', ---------------------------------------------------------------------------------------------- libretro-fbneo.mk 2d05f6cd665d6a2f0a876e2f50192c3fce53ed65 # Version: Commits on Sept 23, 2025 ---------------------------------------------------------------------------------------------- (libretro) update files, ------------------------------------------------------------------------------------------------- libretro-mojozork.mk c3e08bc740b48e8c0297fd5c3b5cb09136201987 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------------------- sdl3: Update the pre-game message text., ------------------------------------------------------------------------------------------------- libretro-panda3ds.mk 9a91c0bc30d92b2c1722e0b972d226253bf63528 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------------------- Add support for using system LuaJIT (#808) * Add support for using system LuaJIT * Test CI: Update package list * Update toml11, ----------------------------------------------------------------------------------------------- libretro-ppsspp.mk 4a790ebc6b93666f2b721fcdbcc4ddc959933f66 # Version: Commits on Sept 23, 2025 ----------------------------------------------------------------------------------------------- Merge pull request #20833 from hrydgard/assorted-fixes Assorted cleanups and fixes, ------------------------------------------------------------------------------------------------ libretro-sameboy.mk 86bf58ae27c4654dd96db34a83f139b7dc75bb15 # Version: Commits on Sept 23, 2025 ------------------------------------------------------------------------------------------------ Fixes #718, always reset the rewind buffer on auto state load.,
------------------------------------------------------------------------------------ eden.mk bf4dce8d0b0f5fb5abb4e0687b6d3005815b0ce6 # Version: Commits on Sept 24, 2025 ------------------------------------------------------------------------------------ [hid_core/frontend] use shared lock for accesses on emulated controller (reduces contention in FBSD) (#2553) -------------------------------------------------------------------------------------- ikemen.mk 3f64a81dcc032a3ddbb11d5b359318d08124a312 # Version: Commits on Sept 24, 2025 -------------------------------------------------------------------------------------- Merge pull request #2691 from ikemen-engine/fix2 fix: FFmpeg 7.1 and 8.0 support, --------------------------------------------------------------------------------------- openmsx.mk d44a87ccc0eb4f6f64a1607fa4ec9607cb35e6bb # Version: Commits on Sept 24, 2025 --------------------------------------------------------------------------------------- Some (final?) updates to the release notes..., ----------------------------------------------------- pcsx2.mk v2.5.174 # Version: Commits on Sept 24, 2025 ----------------------------------------------------- - [ImGui: Add contingent for empty binding in save state select menu](PCSX2/pcsx2#13291) ------------------------------------------------------------------------------------ play.mk a3d84f977b721cda752299739fec525addce1ef9 # Version: Commits on Sept 22, 2025 ------------------------------------------------------------------------------------ Sys246: Remove Soul Calibur 3 exception for 31kHz mode., -------------------------------------------------------------------------------------- ppsspp.mk d43f24dab3b440d82b1ec7ee1c5cc25e0f24510e # Version: Commits on Sept 24, 2025 -------------------------------------------------------------------------------------- Merge pull request #19336 from hrydgard/headless-defaults Use config defaults in the headless binary., ------------------------------------------------------------------------------------- rpcs3.mk 8163c6c041ab77d40f69946285c323ed9db7ea67 # Version: Commits on Sept 12, 2025 ------------------------------------------------------------------------------------- cellPad: simplify output button logic, ---------------------------------------------------------------- ruffle.mk nightly-2025-09-24 # Version: Commits on Sept 24, 2025 ---------------------------------------------------------------- ## What's Changed * core: Fix logic when determining next frame by @Bale001 in ruffle-rs/ruffle#21751 * chore: Bump the `profiling`, `tracing`, and `tracy` crate families by @torokati44 in ruffle-rs/ruffle#21750 * chore: Bump the `hyper` and `quinn` crate families by @torokati44 in ruffle-rs/ruffle#21749 * build(deps): bump the cargo-minor group with 9 updates by @dependabot[bot] in ruffle-rs/ruffle#21598 * web: Don't use .npmrc for detect_chromedriver_version by @danielhjacobs in ruffle-rs/ruffle#20041 **Full Changelog**: ruffle-rs/ruffle@nightly-2025-09-23...nightly-2025-09-24, -------------------------------------------------------------------------------------- snes9x.mk 94115094ead4da7342bd638bb4cc293ae7d297c0 # Version: Commits on Sept 24, 2025 -------------------------------------------------------------------------------------- win32: Don't use precise throttle when NetPlay activated., --------------------------------------------------------------------------------------------- supermodel-es.mk 369c9f421511f4c37234e4061bcaaab4dfc544ac # Version: Commits on Sept 24, 2025 --------------------------------------------------------------------------------------------- 0.3a-f2e3292, ------------------------------------------------------------------------------------------------- supermodel-legacy.mk 108386afb84b2bbab968e8640444fd8201309152 # Version: Commits on Sept 24, 2025 ------------------------------------------------------------------------------------------------- Align aliased -border argument, ---------------------------------------------------- xemu.mk v0.8.104 # Version: Commits on Sept 23, 2025 ---------------------------------------------------- , -------------------------------------------------------------------------------------------- xenia-native.mk bb740af7f9d0b789de214dfcff311daabdb7a60a # Version: Commits on Sept 23, 2025 -------------------------------------------------------------------------------------------- [XAM] Fixed XamShowSigninUI ImGUI assert, ------------------------------------------------------------------------------------- box64.mk 0e90b94272de677ea224d7cbf9783e45ba138a62 # Version: Commits on Sept 24, 2025 ------------------------------------------------------------------------------------- [ARM64_DYNAREC] Fixed flags for 8bits imul, ---------------------------------------------------------------------------------------- corsixth.mk ed7766666da8a1980fb42e52cc18ecb1f053a47a # Version: Commits on Sept 24, 2025 ---------------------------------------------------------------------------------------- Update Italian translation (#3047) Co-authored-by: dodero4 <156615322+dodero4@users.noreply.github.com>, ---------------------------------------------------------------------------------------- etlegacy.mk 87449615af801547f057b32dd627ce6a24ef07c6 # Version: Commits on Sept 24, 2025 ---------------------------------------------------------------------------------------- app: update gradle and few dependencies, -------------------------------------------------------------------------------------------- jazz2-native.mk ab7a8d57f829a8ac3015904a93b84f7137aff3a9 # Version: Commits on Sept 24, 2025 -------------------------------------------------------------------------------------------- Unicode optimizations, ----------------------------------------------------------------------------------------- openmohaa.mk 28e6ea159cdc183c154074f88c4256735aab550a # Version: Commits on Sept 22, 2025 ----------------------------------------------------------------------------------------- SV_RehashBans_f may be executed when the server isn't running (#785), ----------------------------------------------------- rclone.mk v1.71.1 # Version: Commits on Sept 24, 2025 ----------------------------------------------------- This is the v1.71.1 release of rclone. Full details of the changes can be found in [the changelog](https://rclone.org/changelog/#v1-71-1-2025-09-24). , -------------------------------------------------------- syncthing.mk v2.0.10 # Version: Commits on Sept 24, 2025 -------------------------------------------------------- ## Major changes in 2.0 - Database backend switched from LevelDB to SQLite. There is a migration on first launch which can be lengthy for larger setups. The new database is easier to understand and maintain and, hopefully, less buggy. - The logging format has changed to use structured log entries (a message plus several key-value pairs). Additionally, we can now control the log level per package, and a new log level WARNING has been inserted between INFO and ERROR (which was previously known as WARNING...). The INFO level has become more verbose, indicating the sync actions taken by Syncthing. A new command line flag `--log-level` sets the default log level for all packages, and the `STTRACE` environment variable and GUI has been updated to set log levels per package. The `--verbose` and `--logflags` command line options have been removed and will be ignored if given. - Deleted items are no longer kept forever in the database, instead they are forgotten after fifteen months. If your use case require deletes to take effect after more than a fifteen month delay, set the `--db-delete-retention-interval` command line option or corresponding environment variable to zero, or a longer time interval of your choosing. - Modernised command line options parsing. Old single-dash long options are no longer supported, e.g. `-home` must be given as `--home`. Some options have been renamed, others have become subcommands. All serve options are now also accepted as environment variables. See `syncthing --help` and `syncthing serve --help` for details. - Rolling hash detection of shifted data is no longer supported as this effectively never helped. Instead, scanning and syncing is faster and more efficient without it. - A \default folder\ is no longer created on first startup. - Multiple connections are now used by default between v2 devices. The new default value is to use three connections: one for index metadata and two for data exchange. - The following platforms unfortunately no longer get prebuilt binaries for download at syncthing.net and on GitHub, due to complexities related to cross compilation with SQLite: - dragonfly/amd64 - solaris/amd64 - linux/ppc64 - netbsd/* - openbsd/386 and openbsd/arm - windows/arm - The handling of conflict resolution involving deleted files has changed. A delete can now be the winning outcome of conflict resolution, resulting in the deleted file being moved to a conflict copy. This release is also available as: * APT repository: https://apt.syncthing.net/ * Docker image: `docker.io/syncthing/syncthing:2.0.10` or `ghcr.io/syncthing/syncthing:2.0.10` (`{docker,ghcr}.io/syncthing/syncthing:2` to follow just the major version) ## What's Changed ### Fixes * fix: improve conflict detection by tracking previous file hash (fixes #10349) by @calmh in syncthing/syncthing#10351 * fix(ur): properly skip zero/empty fields in report by @calmh in syncthing/syncthing#10394 * fix(gui): don't fetch usage report preview unnecessarily on GUI load by @calmh in syncthing/syncthing#10395 * fix(db): only perform foreign key checking when a migration was applied by @pixelspark in syncthing/syncthing#10397 * fix(syncthing): do not perform CPU benchmark on startup unless logging enabled by @pixelspark in syncthing/syncthing#10398 * fix(model): don't announce untrusted devices to other devices (fixes #10393) by @calmh in syncthing/syncthing#10408 * fix(sqlite): actually always insert blocks for local files (fixes #10388) by @calmh in syncthing/syncthing#10411 ### Other * build: update GitHub actions by @mrclmr in syncthing/syncthing#10399 **Full Changelog**: syncthing/syncthing@v2.0.9...v2.0.10, ----------------------------------------------------------------------------------------- retroarch.mk 3f19b2a107c77b2efff2389a5844ef330128d07a # Version: Commits on Sept 24, 2025 ----------------------------------------------------------------------------------------- Fetch translations from Crowdin, ----------------------------------------------------------------------------------------- doomretro.mk 1d4d55b216ffa5ea1932209abe0594f3806c8ca6 # Version: Commits on Sept 24, 2025 ----------------------------------------------------------------------------------------- Fix typo, ------------------------------------------------------------------------------------------------- libretro-mojozork.mk 4d5082c504613b4ec9feea65a2ceaae08208e872 # Version: Commits on Sept 24, 2025 ------------------------------------------------------------------------------------------------- save: Stick a header on the Z-Machine state dump we currently use for saves. This is hopefully getting replaced by Quetzal format sooner or later., ----------------------------------------------------------------------------------------------- libretro-ppsspp.mk d43f24dab3b440d82b1ec7ee1c5cc25e0f24510e # Version: Commits on Sept 24, 2025 ----------------------------------------------------------------------------------------------- Merge pull request #19336 from hrydgard/headless-defaults Use config defaults in the headless binary., ------------------------------------------------------------------------------------------------ libretro-sameboy.mk f769eff1d959e0d1dce07eccd727ee4e68d4b518 # Version: Commits on Sept 24, 2025 ------------------------------------------------------------------------------------------------ Pressing buttons in Rewind should now cancel rewind mode, -------------------------------------------------------------------------------------------- glsl-shaders.mk bbec046178947afb6a1d69330d4b9800a0734328 # Version: Commits on Sept 24, 2025 -------------------------------------------------------------------------------------------- tiny_ntsc optimize speed (#532),
Purpose
As of recently, Syncthing executes a
PRAGMA foreign_key_checkto verify migrations did not cause a foreign key violation. This check runs even when no migrations were applied (although the base schema script is re-run a few times always). However, this check appears to require reading the full database, which (on iOS/macOS at least) makes startup quite a bit slower.Startup time is crucial on iOS because we only get few seconds each time we run (either foreground or background) and the system keeps closing the app all the time.
This change causes the check to only be executed when actual migrations were performed. (On startup the schema scripts are also run again, according to the code to recreate triggers, so that should not matter for foreign key integrity at all).
On my Mac (M1 Max) this reduced startup time from 3s to 1.5s for a 2,2 GB database (whose pages were probably in memory already).
Testing
Built & tested with Synctrain on macOS.
Screenshots
Before:
After:
Documentation
n/a
Authorship
Your name and email will be added automatically to the AUTHORS file based on the commit metadata.
@calmh after this change, it's the CPU benchmarking that seems to take a chunk of time. This is less impactful but given it happens each startup, and eats a bit of battery, would you accept a PR to disable this programmatically?