wangyong9999 opened a new pull request, #253:
URL: https://github.com/apache/paimon-cpp/pull/253

   ### Purpose
   
   Linked issue: close #252
   
   A source-backed primary-key index payload uses one immutable ordered source 
list as its ordinal namespace. After an update retires only part of that list, 
the current reader requires the payload to equal the complete active source set 
of its data level. It rejects the still-valid payload and degrades every 
surviving indexed file to an ordinary scan.
   
   **Key code and data-flow changes**
   
   - Keep the payload's complete source list for group-ordinal localization, 
but compute coverage from its intersection with eligible active files.
   - Accept multiple payload groups at the same level only when their active 
intersections are disjoint. Reject every group involved in an active-source 
overlap.
   - Map accepted groups back only to files allowed by 
`PrimaryKeyIndexSourcePolicy::ShouldRead`; uncovered or newly written files 
retain the existing ordinary-scan fallback.
   - Preserve retired prefix/middle source offsets and deletion files when 
converting surviving files to `IndexedSplit`.
   
   This restores index reuse for surviving compact files without making an 
uncovered file depend on stale index metadata.
   
   ### Tests
   
   - `PkSortedBucketIndexStateTest.*:PrimaryKeySortedIndexScanTest.*`: 39/39 
passed on the equivalent x86_64 GCC 8 internal build.
   - Full equivalent internal `core_test`: 1849/1849 passed with the 
repository's documented loopback `no_proxy` environment.
   - Added coverage for disjoint same-level payloads, retired prefix/middle 
ordinal offsets, active overlap rejection, row-count mismatch, a mixed update 
with deletion-vector preservation, and an active non-eligible APPEND source 
falling back normally.
   
   ### API and Format
   
   No public include API, storage format, or index protocol changes. The change 
only broadens safe read-side reuse of existing source-backed payload metadata.
   
   ### Documentation
   
   Updated the primary-key global-index user guide to describe immutable source 
groups, partial active coverage, disjoint groups, and fallback boundaries.
   
   ### Generative AI tooling
   
   Generated-by: OpenAI Codex (GPT-5)


-- 
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]

Reply via email to