4 Commits
Author SHA1 Message Date
Aditya Raj SinghandGitHub 351ddff320 fix(server): compare integrity paths independently of unicode normalization (#31102)
* fix(server): compare integrity paths independently of unicode normalization

The untracked-file check compared on-disk paths against the database
byte for byte. macOS writes decomposed (NFD) filenames while an upload
stores the composed (NFC) form, so every asset with a non-ASCII name
came back from getAssetPathsByPaths under a different byte sequence,
was never removed from the candidate set, and was reported as an
untracked file. One reporter saw 14k false positives on a 55k library.

Look the batch up under both normal forms and key the comparison on
NFC, so a path that differs only in normalization is recognised as
tracked.

* test(server): cover normalized integrity lookup
2026-09-23 06:42:31 -04:00
Aditya Raj SinghandGitHub c1f2756f62 fix(server): never unlink an untracked-file path that an asset now references (#31074) 2026-09-01 15:50:07 +02:00
Aditya Raj SinghandGitHub c1a88dd9a3 fix(ml): read CLIP model configs as UTF-8 (#31075) 2026-08-27 23:04:40 -04:00
Aditya Raj SinghandGitHub dc3d6eeec4 fix(server): kill pg_dump when a backup fails so it stops holding table locks (#30851)
* fix(server): kill the child process when a spawned duplex stream is destroyed

A failed database backup left pg_dump running. The stream was destroyed but
the child was not, so the dump sat idle in transaction holding AccessShareLock
on every table until someone terminated it by hand. One report had it survive
five days and block DDL from another application on the same Postgres.

Destroying the duplex now kills the child, which also covers pipeline()
tearing every stream down when one of them fails.

The backup service additionally holds references to the streams it spawns so
the error path can destroy them. createWriteStream can throw before pipeline()
takes ownership, which is how the reported ENOENT on an unmounted backup volume
left nothing referencing the running pg_dump.

* chore(server): drop the explanatory comments from the backup teardown fix

Requested in review. The reasoning lives in the commit message and the PR
body, which is where it belongs.
2026-08-27 12:15:45 -04:00