Fix segment ID mismatch in parallel indexing with non-UTC segmentGranularity - #20032
Open
triopo wants to merge 1 commit into
Open
Fix segment ID mismatch in parallel indexing with non-UTC segmentGranularity#20032triopo wants to merge 1 commit into
triopo wants to merge 1 commit into
Conversation
…ularity
SinglePhaseParallelIndexTaskRunner built the parent's SegmentIdWithShardSpec
using the interval as returned from the sub-task, which retains its original
time zone. When segmentGranularity specifies a non-UTC time zone (e.g.
Europe/Warsaw), Interval#toString() renders with the zone offset (e.g.
"2026-04-08T00:00:00.000+02:00"), while the sub-task's own segment ID for the
same interval is built from a JSON-deserialized interval that normalizes to
UTC ("2026-04-07T22:00:00.000Z"). The two string representations differ, so
matching prevSegmentId via indexOf() fails and parallel indexing breaks for
non-UTC segment granularities.
Normalize the interval to UTC before constructing the parent's segment ID so
it matches what sub-tasks produce.
FrankChen021
left a comment
Member
There was a problem hiding this comment.
I have reviewed the code for correctness, edge cases, concurrency, and integration risks; no issues found.
Reviewed 1 of 1 changed files.
This is an automated review by Codex GPT-5.6-Luna(max)
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.
Description
SinglePhaseParallelIndexTaskRunner built the parent's SegmentIdWithShardSpec using the interval as returned from the sub-task, which retains its original time zone. When segmentGranularity specifies a non-UTC time zone (e.g. Europe/Warsaw), Interval#toString() renders with the zone offset (e.g. "2026-04-08T00:00:00.000+02:00"), while the sub-task's own segment ID for the same interval is built from a JSON-deserialized interval that normalizes to UTC ("2026-04-07T22:00:00.000Z"). The two string representations differ, so matching prevSegmentId via indexOf() fails and parallel indexing breaks for non-UTC segment granularities.
Normalize the interval to UTC before constructing the parent's segment ID so it matches what sub-tasks produce.
This PR has: