You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
π Bug Report: Deleting a column under write load returns "table not found" to writersΒ #14336
Table with an integer column k and a varchar column y with a default (PATCH β¦/columns/varchar/y with default: "d").
Run 4 writers (createRow with only k) and 4 readers against both API nodes.
Delete column y.
π Expected behavior
Writes keep succeeding (the column is gone or still there), or fail with a column error. The table is never reported as missing.
π Actual Behavior
In 3 of 3 rounds, 2β4 writes 20β90 ms after the delete return 404 table_not_found "Table with the requested ID 'p6_nfβ¦' could not be found.", on both API nodes. Reads are not affected. Without a default on the deleted column: 0 errors in 4 rounds. When writers send the deleted column explicitly, the same 404 appears before the expected 400 Unknown attribute.
Cause: a writer that still has the cached table definition fills in the default for y. Postgres answers 42703 (undefined column), which utopia-php/database maps to NotFoundException('Attribute not found') (Adapter/Postgres.php L2218βL2220). Documents/Create.php L490βL491 turns every NotFoundException into "table not found". A client that reacts to a missing table (recreate, alert, stop syncing) is misled.
π² Appwrite version
2.4.0
π» Operating system
Linux (Debian 12), Docker
π§± Your Environment
Self-hosted Appwrite 2.4.0, Postgres adapter, two API nodes behind no shared in-process cache.
π‘ Suggested fix
Map NotFoundException by its cause: "Attribute not found" β 400 (column_not_found / retryable), only "Collection not found" β table_not_found. Optionally retry once with a fresh table definition when Postgres reports 42703.
Iβd like to work on this issue. The problem appears to be that a PostgreSQL 42703 (undefined column) error is mapped to NotFoundException, which is then incorrectly converted into 404 table_not_found in Documents/Create.php.
I propose fixing the exception mapping so that a missing attribute returns an appropriate column/attribute error instead of incorrectly reporting that the table is missing. Iβll also look into adding a regression test for concurrent writes using a cached schema after a column with a default value is deleted.
Activity
nk0273926 commentedon Oct 12, 2026
Iβd like to work on this issue. The problem appears to be that a PostgreSQL
42703(undefined column) error is mapped toNotFoundException, which is then incorrectly converted into404 table_not_foundinDocuments/Create.php.I propose fixing the exception mapping so that a missing attribute returns an appropriate column/attribute error instead of incorrectly reporting that the table is missing. Iβll also look into adding a regression test for concurrent writes using a cached schema after a column with a default value is deleted.