Skip to content

[bug] bulk_delete is documented atomic but is sequential/non-transactional — partial deletes persist on failure #1433

Closed

Description

@mstomar125

Severity: medium · Confidence: high

Doc says "Deletes multiple nodes atomically. If any deletion fails, the entire transaction is rolled back" (services/node_service/bulk.rs:577-579) but the impl loops store.delete_node(id) (604-625). If the Nth fails, the first N-1 are already committed; caller gets Err and reasonably assumes nothing was deleted → orphaned state / double-delete on retry.

Fix: implement a real transactional multi-delete, or correct the doc to best-effort.


Found via the 2026-06-18 multi-repo bug-hunt sweep. Confidence/severity from the sweep + spot-verification.

Activity

  1. mstomar125 commented on Jun 24, 2026

    @mstomar125
    ContributorAuthor

    Resolved in #1459. New transactional store.bulk_delete deletes all targets in ONE transaction (FK cascade; one Deleted event per node post-commit); the service routes through it instead of looping per-node autocommits. The documented all-or-nothing contract now holds. Test: multi-delete removes all + skips missing ids.

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions