fix(settings): restore before the index opens; archive rows edit only their archive; parallelism follows the brief
Index restore (ENG-06, UI-09): - A staged restore now runs on the files before the index is opened, so it also recovers an index that no longer opens; Settings > Advanced > Restore works without an open index (the current one is shown as unreadable). - The staged copy passes PRAGMA quick_check (before migration, in a scratch copy) ahead of any backup: a damaged copy is set aside as .failed and never renews the daily copies. The index it replaces is kept as a VACUUM INTO copy, or, when it cannot be read, copied whole with its WAL as titano-replaced-<stamp>.db outside the rotation. The staged file is renamed over the index, so it is never applied twice. - Archive > Maintenance gains Restore database..., which opens Settings > Advanced. Archive settings (UI-03, ENG-03): - An archive.json with an empty or overlong name (drive roots) can be edited again: the name read is made usable as at creation. - Proxy and thumbnail sizes outside the presets (an admin's 3840) are listed and shown with their number. - Changing the archive folder retargets the rows: an archive there is registered and rescanned; with none, the rows edit only the defaults of new archives. The rows never fall back to another archive of the index. - Reset all and Import settings no longer rewrite the shared archive.json; Archive > Reset section asks first, naming the archive. - PUT /api/v1/archive/settings: 409 archive_busy on a lease conflict, 409 archive_manifest for a damaged, newer or foreign archive.json (was 500). Parallelism (UI-02): - Auto is the job engine's default, half the logical cores (BRIEF 14.6), with each job's own decode and analysis threads; a value the user sets is the number of workers and caps those threads. The memory budget is shared: each job's frame window gets budget / workers. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_012iLMBNwBE2GnphAsu4cjaC
This commit is contained in:
63 files changed
+484
-179
No files matched your search
@@ -54,7 +54,7 @@ Dependencies point one way: `Core` ← `Core.Windows`, `Data`, `Protocol` ← `S
|
||||
|---|---|
|
||||
| `Sqlite`, `Postgres` | SQLite P/Invoke binding (winsqlite3 / libsqlite3), in-house PostgreSQL wire protocol v3 client with pool and LISTEN |
|
||||
| `Migrations/{sqlite,postgres}/NNNN_name.sql` | Embedded, applied in one transaction at open (`MigrationRunner`) |
|
||||
| `Repositories` | `TitanoDatabase` facade: archives, sequences, frames, tags, renders, jobs, cards, users, tokens, uploads, render nodes, settings, audit; `DatabaseBackups` (daily `VACUUM INTO` copies of an SQLite index kept ×3, restore staged for the next open) |
|
||||
| `Repositories` | `TitanoDatabase` facade: archives, sequences, frames, tags, renders, jobs, cards, users, tokens, uploads, render nodes, settings, audit; `DatabaseBackups` (daily `VACUUM INTO` copies of an SQLite index kept ×3, restore staged for the next start and carried out before the index opens, so it also recovers one that no longer opens) |
|
||||
| `Jobs` | `JobEngine` (its number of workers can change while it runs), `IJobHandler`, `IJobHandlerProvider`, `JobContext` (progress, checkpoints, follow-up jobs) |
|
||||
| `Archiving` | `ArchiveService` (create/adopt/open, archive settings written to `archive.json` then the index), `ArchiveIndexer` (scan, rebuild), `ArchiveIngest` (uploads and imports), `ImportService`, `ArchiveVerifier`, `ArchiveImages`, `ArchiveMaintenance`, `MassRenamer`, `SequenceTrash` (delete into the archive's hidden trash with a dry run, restore; the folder moves back when the index step fails), job handlers |
|
||||
| `Processing` | `ProcessingService`, `SequenceAnalyser`, `SequenceRender`, `ProjectStore`, `RenderNodeClient`, job handlers |
|
||||
|
||||
Reference in new issue
Block a user