Add 5 part multi topic segment name#18991
Draft
rseetham wants to merge 12 commits into
Draft
Conversation
…e fallback The fallback branch (used when fetching partition ids directly from the stream fails) called Map<Integer, Set<Integer>>.add(...), which does not compile. Restore the fallback to decode each PartitionGroupMetadata's padded pinot partition id into (topicId, streamPartitionId) using the existing IngestionConfigUtils helpers, matching the convention already used in createNewSegmentMetadata/getNextLLCSegmentName, with a pass-through shortcut for single-stream tables.
…etadata Fields not yet wired through constructors/getters.
rseetham
marked this pull request as draft
July 14, 2026 14:02
…tionStatus Additive, non-breaking: new constructor overloads accept an explicit topicId identifying which stream config (topic) a partition group belongs to, defaulting to 0 when omitted. Wires topicId through PartitionGroupMetadataFetcher.fetchMultipleStreams using the per-stream index. No existing callers are changed yet.
…ltimeSegmentManager buildPartitionGroupConsumptionStatusFromZKMetadata and getPartitionGroupConsumptionStatusList relied on IngestionConfigUtils padded-id arithmetic to decode topicId/streamPartitionId, which is wrong for multi-topic-format segment names where these values are embedded directly and unpadded. Use LLCSegmentName.getTopicId(true)/ getStreamPartitionGroupId(true) instead, mirroring the pattern already used elsewhere.
…mentDataManager The multi-stream constructor branch used IngestionConfigUtils padded-id arithmetic to decode topicId/streamPartitionId, which is wrong for multi-topic-format segment names. Use LLCSegmentName.getTopicId(true)/ getStreamPartitionGroupId(true) instead, consistent with PinotLLCRealtimeSegmentManager. Also fix the Preconditions.checkState message to reference topicId instead of the old "index" terminology.
fetchMultipleStreams() now sets PartitionGroupMetadata's topicId and partitionGroupId directly from the loop index and raw stream partition id, instead of encoding them into a padded composite id via IngestionConfigUtils. This avoids relying on the padded-id scheme, which the LLCSegmentName multi-topic format has already moved away from.
Several call sites in PinotLLCRealtimeSegmentManager decoded topic and stream partition ids out of a padded composite pinotPartitionId via IngestionConfigUtils, even though a richer LLCSegmentName or PartitionGroupMetadata object was already available with direct, unpadded accessors. Switch those sites to use LLCSegmentName#getTopicId/getStreamPartitionGroupId and PartitionGroupMetadata#getTopicId/getPartitionGroupId instead. Leaves untouched the two call sites that legitimately need IngestionConfigUtils: decoding a genuinely old-format (padded) LLCSegmentName in getNextLLCSegmentName, and getPartitionMetadataFromTableConfig, which only has a raw partition id and TableConfig, not a richer object.
Watermark previously had no topicId field, forcing getStreamMetadataList to decode the stream config index from a padded composite partitionGroupId that is no longer guaranteed to be padded. Add an explicit topicId field and thread it through getConsumerWatermarks/getStreamMetadataList, using the decoded stream partition id (not the raw, possibly still-padded one) when constructing watermarks from PartitionGroupConsumptionStatus.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #18991 +/- ##
==============================================
+ Coverage 65.05% 100.00% +34.94%
+ Complexity 1403 6 -1397
==============================================
Files 3399 3 -3396
Lines 212808 6 -212802
Branches 33568 0 -33568
==============================================
- Hits 138443 6 -138437
+ Misses 63223 0 -63223
+ Partials 11142 0 -11142
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
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.
No description provided.