Prathyush created PHOENIX-8018:
----------------------------------
Summary: Disable global index read repair for ROW_SIZE() and
RAW_ROW_SIZE() scans
Key: PHOENIX-8018
URL: https://issues.apache.org/jira/browse/PHOENIX-8018
Project: Phoenix
Issue Type: Bug
Affects Versions: 5.3.2, 5.3.1
Reporter: Prathyush
ROW_SIZE() and RAW_ROW_SIZE() are used to estimate how much storage a table or
a tenant uses, e.g.:
SELECT /*+ NO_INDEX NO_CACHE */ SUM(RAW_ROW_SIZE()) FROM <COVERED_GLOBAL_INDEX>
When the target is a covered global index,
ScanUtil.setScanAttributesForIndexReadRepair sets CHECK_VERIFY_COLUMN on the
scan. Every unverified row the scan reads is then repaired:
ROW_SIZE() / RAW_ROW_SIZE()
-> CHECK_VERIFY_COLUMN set on the index scan
-> GlobalIndexChecker finds an unverified row
-> repairIndexRows scans the data table row
-> index row is rebuilt/deleted and re-scanned
Why this is a problem:
# RAW_ROW_SIZE(): BaseResultIterators makes this a raw scan (setRaw(true),
readAllVersions()). Index read repair is designed for regular scans, not raw
scans that return delete markers and all versions.
# ROW_SIZE(): the scan is not raw, so repair is semantically valid, but it
adds the same cost. A size function should measure what is physically stored,
unverified rows included, without changing the index.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)