Clarifying VersionedIntervalTimeline.findFullyOvershadowed()
- Dominant language
- Java
- Stars
- 14.1k
- Forks
- 3.8k
- Avg merge
- 2d 58m
- Merged PRs (30d)
- 233
Description
In #7547, @jihoonson added clarifying comments for `completePartitionsTimeline` and `incompletePartitionsTimeline` fields in `VersionedIntervalTimeline`. One of the comments say that "IncompletePartitionsTimeline also includes completePartitionsTimeline".
It explains to me why the second part of the `findFullyOvershadowed()` algorithm iterates only over `incompletePartitionsTimeline`:
https://github.com/apache/incubator-druid/blob/7b9bd5359db80bdd9bb3f547161f94b369469b76/core/src/main/java/org/apache/druid/timeline/VersionedIntervalTimeline.java#L392-L404
But it doesn't explain why then the first part does exactly the same loop over both `completePartitionsTimeline` and `incompletePartitionsTimeline`:
https://github.com/apache/incubator-druid/blob/7b9bd5359db80bdd9bb3f547161f94b369469b76/core/src/main/java/org/apache/druid/timeline/VersionedIntervalTimeline.java#L364-L382
Related to #7433 and #8070.
Contributor guide
Research direction
Start in core/src/main/java/org/apache/druid/timeline/VersionedIntervalTimeline.java and read findFullyOvershadowed(), especially the loops around lines 364-404 and the comments for completePartitionsTimeline and incompletePartitionsTimeline. Clarify why the first loop iterates over both timelines while the second iterates only over incompletePartitionsTimeline; the comments should make this distinction understandable.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- databases
- Issue type
- Documentation
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100