Skip to content

fix(storage): FoldersStorage.save is one transaction, load() retries after a failure (#1767) - #1788

Merged
ZhuchkaTriplesix merged 1 commit into
devfrom
fix/folders-storage-transactional
Oct 25, 2026
Merged

ZhuchkaTriplesix merged 1 commit into
devfrom
fix/folders-storage-transactional

Conversation

@ZhuchkaTriplesix

Copy link
Copy Markdown
Member

Closes #1767.

  • New FolderRepository.replaceFolders (also on LocalDb): one transaction that removes the folders no longer wanted and adds the missing ones. Folders that stay keep their connections; the ones that go release theirs first, as removeFolder does. The old clearFolders + add loop could also delete connections through ON DELETE CASCADE.
  • FoldersStorage.save uses it; load() marks the storage loaded only after a successful read.
  • Test: replace keeps/releases connections and rolls back on a failing insert (a trigger raises on one name). Not run locally, CI will.

@github-actions github-actions Bot added bug Something isn't working storage Theme parser epic label: storage P3 Low priority / Polish & Enhancements labels Oct 25, 2026
@ZhuchkaTriplesix
ZhuchkaTriplesix merged commit 5bcd971 into dev Oct 25, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working P3 Low priority / Polish & Enhancements storage Theme parser epic label: storage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant