Open shishir2001-yb opened 2 months ago
We might hit schema packing not found
error with concurrent CREATE INDEX
and SELECT
in the following scenario:
txn1: create packed row decoder with latest version 56
txn2: alter schema and latest version = 57
txn3: write data to table with version 57
txn1: decode the data written by txn3 and get the error
Currently in ybdb, visibility and restart read required
check is done after the rows are decoded. But if we find a row with larger schema version, read must be started prior to the write time of this row. We can ignore such rows during read.
according to @spolitov For instance we could store current schema version in DocReadContext , and ignore all rows with schema version after this one.
Jira Link: DB-12348
Description
Version: 2.20.4.0-b50 LST and Universe logs: Added in Jira
Query:
SELECT c0_int % 70 FROM t2 WHERE c0_int < -51 ORDER BY 1 LIMIT 8;
Error:
ERROR: Schema packing not found: 57, available_versions: [56, 54, 52, 50, 48, 46, 44, 42, 40, 38, 36, 34, 32, 30, 28, 26, 24, 22, 20, 18, 16, 14, 12, 10, 8, 6, 4, 2, 0, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 21, 23, 25, 27, 29, 31, 33, 35, 37, 39, 41, 43, 45, 47, 49, 51, 53, 55]
Schema:
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information