Skip to content

In-memory PartiQL: ExecuteTransaction accepts several statements on one item and loses writes #75

Closed

Description

@fctl-sh

Priority: high. ExecuteTransaction never checks for statements on the same item, unlike the memory backend's TransactWriteItems ("Transaction request cannot include multiple operations on one item", backend/memory/transact.rs). Every statement is prepared against the state before the transaction and then all are applied, so writes are lost silently:

  • UPDATE t SET a = 1 WHERE pk = 'x' AND sk = 1 plus UPDATE t SET b = 2 WHERE pk = 'x' AND sk = 1 succeeds, and the item ends with a = 0, b = 2.
  • An INSERT plus a DELETE of one item succeeds, and the item still exists.
  • Read transactions that name the same item twice are accepted too.

DynamoDB refuses these with a ValidationException, so code tested on the in-memory backend fails in production.

Where: crates/dynamoxy-core/src/backend/memory/partiql.rs, execute_transaction.

Fix: refuse a transaction whose statements address one item more than once, with the same error as TransactWriteItems/TransactGetItems.

Found in a review of the library for bugs (fctl session); the fixes that fit in its ten pull requests are #61 to #65, #67 to #70 and #72.

Activity

  1. added
    bug
    rust
    on Oct 30, 2026
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

    bugrust

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions