Repository navigation
[fix](be) Respect tuple delete-sign slots in point queries - #70567
Open
ziyinweixiao wants to merge 1 commit into
Open
ziyinweixiao wants to merge 1 commit into
ziyinweixiao wants to merge 1 commit into
Conversation
### Background Short-circuit point queries read projected values from row-store JSONB and fetch missing columns from column storage. Normal visibility also needs a delete-sign tuple slot even when SELECT does not project it. ### What problem does this PR solve? Issue Number: None Related PR: None PR Type: Bugfix Problem Summary: With show_hidden_columns=true, a partial-row-store SELECT v can have no delete-sign tuple slot. Adding the schema delete-sign UID unconditionally then causes unordered_map::at to abort the BE during column-store fallback. Request the delete-sign column only when its tuple slot exists, and retain fallback reads when a cached row-store payload cannot supply all columns. ### Details - **Frequency:** Reproduced on a partial row store with debug visibility and a projected ordinary column. - **Root cause:** The requested UID set included a delete-sign column absent from the tuple UID map. - **Why existing tests missed it:** Hidden-column tests select hidden columns and bypass short circuit; they do not cover ordinary projections with debug visibility on a partial row store. - **Fix:** Derive the delete-sign index from the tuple and add its actual slot to the requested set. Skip the payload-only cache fast path when column-store reads are required. - **Other paths and branches:** Both synchronous and read-ahead fallback use the corrected UID set. Normal delete filtering is preserved. No wire, schema or persisted-format changes. ### Testing - Reproduced the original SIGABRT on unmodified adad294. - Official ASAN BE build passed. - Official regression runner passed test_point_query_delete_sign_projection, test_short_circuit_rowset_hidden_columns and test_point_query_light_schema_change. - The new regression passed with row cache disabled and enabled; the final run also enabled query read-ahead and asynchronous file-cache writes. - Four descriptor unit tests added; matching-toolchain syntax check passed. The BE unit-test executable was not built or run. - Official clang-format 16, build hygiene and changed-line clang-tidy passed. ### Release note Fix BE crashes when short-circuit point queries read ordinary columns from partial row-store tables with show_hidden_columns enabled. Mixed projections continue to fetch columns that are not present in the cached row-store payload. ### Check List (For Author) - Behavior changed: Yes (see Details). - Does this need documentation: No. - Pre-submission status: Partially verified: BE unit-test execution remains for CI. ### AI Disclosure - Tool: Codex, GPT-6.1 Sol. - Generated: Code, tests and this description. - Human review: Pending.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Background
Short-circuit point queries read projected values from row-store JSONB and fetch missing columns from column storage. Normal visibility also needs a delete-sign tuple slot even when SELECT does not project it.
What problem does this PR solve?
Issue Number: None
Related PR: None
PR Type: Bugfix
Problem Summary:
With show_hidden_columns=true, a partial-row-store SELECT v can have no delete-sign tuple slot. Adding the schema delete-sign UID unconditionally then causes unordered_map::at to abort the BE during column-store fallback. Request the delete-sign column only when its tuple slot exists, and retain fallback reads when a cached row-store payload cannot supply all columns.
Details
Testing
Release note
Fix BE crashes when short-circuit point queries read ordinary columns from partial row-store tables with show_hidden_columns enabled. Mixed projections continue to fetch columns that are not present in the cached row-store payload.
Check List (For Author)
AI Disclosure
Background
What problem does this PR solve?
Issue Number:
Related PR:
PR Type:
Problem Summary:
Details
Testing
Notes for Reviewers
Release note
Check List (For Author)
AI Disclosure