[DocDB] Add uniqueness validation in the PgGate layer to ensure that hidden tablets are not causing duplicate requests #24917
Labels
area/ysql
Yugabyte SQL (YSQL)
kind/enhancement
This is an enhancement of an existing feature
priority/high
High Priority
status/awaiting-triage
Issue awaiting triage
Jira Link: DB-14048
Description
Per @andrei-mart , PgGate takes the list of tablets as a list of their lower bounds. Each tablet's upper bound is supposed to be next shard's lower_bound. There's no overlaps or gaps possible that way. And the keys must be sorted and unique, lower bound equal or greater than upper bound means empty partition. Apparently PgGate does not verify uniqueness, can cause bugs like #24860 to be introduced.
Add additional debug checks in PgGate layer to honor the uniqueness, so as to prevent issues like #24860 from being introduced again.
Issue Type
kind/enhancement
Warning: Please confirm that this issue does not contain any sensitive information
The text was updated successfully, but these errors were encountered: