mrhhsg opened a new pull request, #71366:
URL: https://github.com/apache/doris/pull/71366
### What problem does this PR solve?
Issue Number: None
Related PR: #71292
Cherry-picked from #71292.
Short-circuit point queries over partial row storage can lose existing rows
when a scan slot, such as a non-projected key, is read by neither row storage
nor column storage. Comparing the number of scan slots with the number of
row-store columns does not reliably identify these slots, and padding only
after all keys are read leaves column lengths inconsistent during multi-key
JSONB decoding.
Partial row-cache payloads also lack the row location required to read
columns absent from row storage.
This backport:
- Precomputes the scan slots read by neither storage path and appends one
default per successfully read row, keeping all columns aligned before the next
key is decoded.
- Bypasses both row-cache lookup and insertion for partial row storage,
including previously cached incomplete payloads.
- Preserves full-row caching and actual storage reads for output columns and
the delete sign.
- Adapts the BE test fixture to branch-4.2's existing Reusable, rowset and
segment-loader APIs, covering Tablet and CloudTablet with this branch's
contiguous segment layout. It does not import master's segment-retention or
segment-list changes.
### Release note
Fix missing rows in short-circuit point queries over partial row storage.
### Check List (For Author)
- Test:
- [x] Unit Test: 20 targeted ASAN BE tests passed, with no failures or
skipped tests.
- [x] Regression test: six native SQL suites passed, with no failed, fatal
or skipped scripts.
- Behavior changed:
- [x] Yes. Preserve rows and column alignment for partial row-store point
queries; partial row-store requests no longer use the row cache.
- Does this need documentation?
- [x] No.
### Validation
- `./build.sh --be --fe -j 48`: passed, including FE Checkstyle with zero
violations.
- `./run-be-ut.sh --run --filter
'*PointQuerySegmentReuseTest*:*PointQueryReusableTest*:*RowCacheTest*:*LookupConnectionCacheTest*'
-j 48`: 20 ASAN tests passed.
- SQL regression suites: `test_short_circuit_partial_rowstore_projection`,
`test_rowstore.groovy`, `test_rowstore_query.groovy`,
`test_short_circuit_rowset_hidden_columns`,
`test_rowstore_nested_pruning_minimal` and
`test_point_query_light_schema_change`: all six passed.
- `bash build-support/check-format.sh`, clang-format checks for all changed
C++ files and `git diff --check`: passed.
Native SQL validation used `enable_java_support=false`; Java UDF/JDBC, a
live cloud deployment, multi-BE and mixed-version deployments were not tested.
The CloudTablet unit-test parameter is not a live cloud validation. No
performance benchmark was run.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]