Repo settings are a whole-blob read-modify-write #123

closed cmc opened this on 2026-09-03 05:16 UTC · bug store · milestone v1.12.0

Discussion

cmc 2026-09-03 05:16 UTC

Every repo settings * command reads repo.Settings, changes one field and calls SetRepoSettings (internal/store/repos.go:94), which overwrites settings_json. Two concurrent admins lose one change. SetForkOf follows the same pattern.

Remedy: json_set in the UPDATE, or re-read inside a transaction.

closed by commit 5e9732fb1d by cmc: store: one admin's settings change no longer overwrites another's

2026-09-04 15:58 UTC