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
Running DDLs from multiple threads/nodes can lead to catalog version mismatch.
But internally retrying is not reliable for DDLs because system tables are not (yet) transactional. Therefore retrying can lead to the table already exists error.
The text was updated successfully, but these errors were encountered:
@georgeklees To clarify: Currently, YB client retries any requests that time out. Retrying is not reliable for DDLs, so as a first step, we should avoid retrying DDL requests in YB client.
Summary:
Currently, all simple YSQL queries are considered for retry if they fail, but [issue #1333](#1333)
explains that this is unsafe for DDL commands, as they modify system tables which don't yet have
transaction support. This patch detects the command and only considers retry for the four known DML
requests that are supported (`DELETE`, `INSERT`, `SELECT`, `UPDATE`).
Test Plan:
Open two independent `ysqlsh` sessions. In the first one do `CREATE TABLE a(id int primary key)`
and wait for a few seconds. Then in the second one do `CREATE TABLE b(id int primary key)`. It should result
in the error `ERROR: Catalog Version Mismatch: A DDL occurred while processing this query. Try Again.`
Reviewers: mihnea, neha
Reviewed By: mihnea, neha
Subscribers: yql
Differential Revision: https://phabricator.dev.yugabyte.com/D6851
Running DDLs from multiple threads/nodes can lead to catalog version mismatch.
But internally retrying is not reliable for DDLs because system tables are not (yet) transactional. Therefore retrying can lead to the table already exists error.
The text was updated successfully, but these errors were encountered: