GitHub user SiasDoming added a comment to the discussion: Why does Secondary
Index not offer a partitioned variant like Record Level Index?
Thanks a lot for the pointers to #16706 and #17308 — really helpful. It's
reassuring to see the idea of a **non-global SI** being explored. I agree that
building partition-scoped SI file groups is a much more natural approach,
analogous to how partitioned RLI is implemented, and it aligns well with the
concurrency benefits we described in the original post.
Regarding #17308 (HUDI-8517): I understand the current limitation —
`HoodieSecondaryIndexInfo` doesn't carry partition information the way
`HoodieRecordIndexInfo` does, so the in-memory `MetadataPayload` is not fully
self-describing and requires partition context to be passed along separately.
However, it seems there is a simpler path forward: **simply pass the partition
context alongside the SI lookup procedure**, similar to
`HoodieBackedTableMetadata.readRecordIndexLocationsWithKeys(HoodieData<String>
recordKeys, Option<String> dataTablePartition)` and its calling chain for
partitioned RLI. Admittedly, this makes the result type less self-contained —
every consumer of SI lookup results has to remember to thread the partition
context through, which is a bit error-prone and somewhat ugly.
That said, I don't think this is a serious problem in practice, because **the
SI lookup pipeline is essentially closed**: the direct output of an SI lookup
is almost always consumed immediately by a subsequent RLI lookup rather than
exposed to arbitrary external callers — as illustrated by the call site at
`HoodieBackedTableMetadata.readSecondaryIndexLocationsWithKeysV2`. The
"ugliness" stays contained inside the metadata subsystem instead of leaking
into user-facing APIs.
```Java
public class HoodieBackedTableMetadata extends BaseTableMetadata {
// ...
private HoodiePairData<String, HoodieRecordGlobalLocation>
readSecondaryIndexLocationsWithKeysV2(HoodieData<String> secondaryKeys, String
partitionName) {
return
readRecordIndexLocationsWithKeys(readSecondaryIndexDataTableRecordKeysV2(secondaryKeys,
partitionName));
}
// ...
}
```
And one follow-up question for the community: Are both #16706 and #17308 being
actively tracked? Are there any planned milestones or assigned RFCs for a
non-global SI variant, or is this still in the exploratory stage? Happy to
contribute code or test cases if this moves forward — our team would definitely
benefit from it given our pessimistic-locking setup.
GitHub link:
https://github.com/apache/hudi/discussions/20902#discussioncomment-19885839
----
This is an automatically sent email for [email protected].
To unsubscribe, please send an email to: [email protected]