Skip to content

upsert_transaction_record script insert and record upsert are separate transactions, can orphan script data #216

Description

@Sertug17

Bug

upsert_transaction_record in crates/idxdb-store/src/transaction/utils.rs first inserts the transaction script via idxdb_insert_transaction_script, then upserts the transaction record via idxdb_upsert_transaction_record. These are two separate Dexie transactions.

If the second call fails, the script is stored with no corresponding transaction record referencing it. This orphaned script data accumulates in IndexedDB and is never cleaned up.

Impact

  • Orphaned script data in IndexedDB that is never reclaimed
  • Low severity (no data corruption), but violates atomicity expectations

Root cause

No wrapping transaction. Same pattern as the upsert_account_storage bug (separate issue).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions