Skip to content

Transaction commit fails with transaction_conflict (409) when staged rows have relationships to the same row; rollback then fails with "transaction is not ready" #15466

Open

Description

@chaosdev507

👟 Reproduction steps

Descripción

Committing a TablesDB transaction that creates several rows, each with a many-to-one relationship to the same parent row, fails with 409 transaction_conflict. No rows are created. The same flow worked
on previous server versions.

Environment

  • Appwrite 2.7.1, self-hosted (upgraded from an earlier version (1.9.6); the same code worked before the upgrade)
  • Reproduced with node-appwrite 22.1.3 and 31.1.0, so it is not SDK-specific
  • Runtime node-22, requests made with a server API key

Schema (table assignments)

  • event: relationship, manyToOne to events, one-way, onDelete: cascade
  • volunteer: relationship, manyToOne to volunteers, one-way, onDelete: cascade
  • eventId, volunteerId: required strings
  • Unique index on (eventId, volunteerId)

Steps to reproduce

  1. tablesDB.createTransaction()
  2. tablesDB.createRow({ ..., rowId: 'unique()', data: { event: , eventId: , volunteer: <volunteerId_N>, volunteerId: <volunteerId_N>, ... }, transactionId }) for 3 different
    volunteers (staged in parallel or one at a time, same result)
  3. tablesDB.updateTransaction({ transactionId, commit: true })

👍 Expected behavior

Expected behavior
The commit succeeds, since the rows are new, use distinct volunteers and nothing else touched them. If there were a genuine conflict, the transaction should be left in a state that still accepts
rollback.

Notes

👎 Actual Behavior

Actual behavior

  • The commit fails: AppwriteException, type: transaction_conflict, code: 409, message "The transaction has a conflict. Please resolve the conflict and try again."
  • None of the 3 rows is created.
  • A following updateTransaction({ transactionId, rollback: true }) fails with "The transaction is not ready yet. Please try again later.", so the rollback error hides the real commit error unless the
    caller logs it first.

🎲 Appwrite version

Different version (specify in environment)

💻 Operating system

Linux

🧱 Your Environment

Environment

  • Appwrite 2.7.1, self-hosted (upgraded from an earlier version (1.9.6); the same code worked before the upgrade)
  • Reproduced with node-appwrite 22.1.3 and 31.1.0, so it is not SDK-specific
  • Runtime node-22, requests made with a server API key

👀 Have you spent some time to check if this issue has been raised before?

  • I checked and didn't find similar issue

🏢 Have you read the Code of Conduct?

Activity

  1. added theissue type on Nov 10, 2026
  2. added
    feature / relationships
    product / databases
    on Nov 10, 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

    feature / relationshipsproduct / databases

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions