Skip to content

Fix DB startup crash and explicit shared DB migration#1566

Open
FilipJaskovic wants to merge 3 commits into
ahrm:developmentfrom
FilipJaskovic:fix/db-startup-shared-db-migration-r2
Open

Fix DB startup crash and explicit shared DB migration#1566
FilipJaskovic wants to merge 3 commits into
ahrm:developmentfrom
FilipJaskovic:fix/db-startup-shared-db-migration-r2

Conversation

@FilipJaskovic

Copy link
Copy Markdown

This PR fixes DB startup issues around corrupt rows and shared DB migration.

What changed

  • Guard DB callback decoding against null/malformed values and skip invalid rows instead of crashing.
  • Keep strict fail-fast when shared_database_path (CLI or config) is explicitly set and DB open fails.
  • Restore first-run migration path: if explicit shared DB is set, split DB files are missing, and legacy test.db exists, bootstrap from legacy DB once so data is migrated.
  • Propagate migration failure to startup by returning bool from ensure_database_compatibility(...) and split_database(...).

@FilipJaskovic FilipJaskovic marked this pull request as ready for review March 5, 2026 13:36
@ahrm

ahrm commented Mar 11, 2026

Copy link
Copy Markdown
Owner

Thanks, since this is a relatively big change I want to implement it myself (I am a little busy right now) but I will definitely use these commits to make sure I have not missed anything, I definitely appreciate your work.

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.

2 participants