Skip to content
Back

[Bug?] row_already_exists (409) after manual deletion, stale unique index?

  • 0
  • Tools
  • Databases
  • Web
  • Cloud
Horsty - Cyril - MagicTools
30 Mar, 2026, 18:01

Hi, I'm experiencing a confusing issue with Appwrite Cloud

Setup: A tournaments table with a composite UNIQUE index on (tournament_name, date).

Steps to reproduce:

Delete a row manually via the Console Verify deletion: getRow(deletedId) → 404 ✅ listRows by tournament_name + date → 0 results ✅

Try to createRow with the same tournament_name + date values → 409 row_already_exists: "Row with the requested ID <OLD_ID> already exists."

The error references the old deleted row's ID, which proves the unique index still holds a stale reference to it.

Is there a known TTL or async cleanup delay on unique index entries after a row is deleted via the Console? Is this a known limitation? Is the behavior different when deleting via SDK vs Console? Is there a way to force-clear a stale index entry (other than trying to deleteRow the ghost ID and hoping it flushes the index)?

I've seen nothing about it in the docs

Thanks

TL;DR
Issue: After manually deleting a row in the `tournaments` table with a composite unique index, attempting to recreate the same row results in a 409 error referencing the old deleted row's ID. Solution: This issue may be caused by a stale unique index entry. It's recommended to try deleting the ghost ID or contacting Appwrite support for assistance.
Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more