yugabyte / yugabyte-db

YugabyteDB - the cloud native distributed SQL database for mission-critical applications.
https://www.yugabyte.com
Other
8.95k stars 1.07k forks source link

[YSQL] Ensure that multi-statement queries via simple query protocol don't face serialization errors in read committed isolation #21833

Open pkj415 opened 6 months ago

pkj415 commented 6 months ago

Jira Link: DB-10735

Description

As part of fixing #21361, query layer retries were blocked for multi-statement queries via simple query protocol since a query could have multiple transaction blocks within it and retrying the whole query would lead to some of them transactions to be executed twice (which would be a problem if they aren't idempotent).

Since read committed isolation relies on top-level query layer retries for resolving serialization errors, we would require another mechanism to resolve them for multi-statement queries. Implement Pg style "read committed update checking" mechanism for resolving conflicts #11573, that will fix this issue too.

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

pilshchikov commented 1 month ago

Reproduced frequently when CQL workload creates more and more tables with aggressive tablet splitting