Skip to content

Potential Race Condition against Segment Tier during Reload All Segments #18164

@J-HowHuang

Description

@J-HowHuang

Description

We fetch the IndexLoadingConfig once here:

reloadSegments(segmentDataManagers, fetchIndexLoadingConfig(), forceDownload, reloadJobId);

Then we submit tasks that reload individual segments to the reload/refresh executor, where each task do set the tier to the shared IndexLoadingConfig object based on the segment itself:

public void reloadSegment(String segmentName, IndexLoadingConfig indexLoadingConfig, SegmentZKMetadata zkMetadata,
SegmentMetadata localMetadata, boolean forceDownload)
throws Exception {
String segmentTier = getSegmentCurrentTier(segmentName);
indexLoadingConfig.setSegmentTier(segmentTier);

Impact

This can cause problem where segments would be preprocessed with a wrong config if tier overwrite is present in table config, when the instance has segments on different tiers.

Metadata

Metadata

Assignees

No one assigned

    Labels

    tiered-storageRelated to tiered storage support

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions