Skip to content

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

Closed

Description

@ajianaz

Problem

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

  1. crud.rs:243 — update() does UPDATE memories then DELETE/INSERT tags without transaction
  2. crud.rs:295 — update_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)

Activity

  1. added
    bug
    scope:core
    on Aug 10, 2026
  2. ajianaz commented on Aug 10, 2026

    @ajianaz
    CollaboratorAuthor

    Fixed in #983 (merged to develop)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugscope:core

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions