mirror of https://github.com/apache/druid.git
88d26e4541
Fix the logic for usage of segment descriptors from queries in SinkQuerySegmentWalker when there are upgraded segments as a result of concurrent replace. Concurrent append and replace: With the introduction of concurrent append and replace, for a given interval: The same sink can correspond to a base segment V0_x0, and have multiple mappings to higher versions with distinct partition numbers such as V1_x1.... Vn_xn. The initial segment allocation can happen on version V0, but there can be several allocations during the lifecycle of a task which can have different versions spanning from V0 to Vn. Changes: Maintain a new timeline of (An overshadowable holding a SegmentDescriptor) Every segment allocation of version upgrade adds the latest segment descriptor to this timeline. Iterate this timeline instead of the sinkTimeline to get the segment descriptors in getQueryRunnerForIntervals Also maintain a mapping of the upgraded segment to its base segment. When a sink is needed to process the query, find the base segment corresponding to a given descriptor, and then use the sinkTimeline to find its chunk. |
||
---|---|---|
.. | ||
src | ||
pom.xml |