Skip to content

update() and update_fields() lack transaction for memory + tags dual-write #977

Description

@ajianaz

Problem

Same bug class as the fixed insert() (PR #970), but in two more methods:

  1. crud.rs:243update() does UPDATE memories then DELETE/INSERT tags without transaction
  2. crud.rs:295update_fields() same pattern

If tag insert fails after memory UPDATE, tags are left in inconsistent state (deleted but not re-inserted).

Fix

Wrap both methods in unchecked_transaction() — same pattern as the fixed insert().

Severity: MAJOR (data integrity)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingscope:coreCore engine work

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions