Skip to content

feat: strict tier-aware load/handoff status endpoints#19526

Draft
jtuglu1 wants to merge 1 commit into
apache:masterfrom
jtuglu1:implement-strict-tier-aware-load-handoff-status
Draft

feat: strict tier-aware load/handoff status endpoints#19526
jtuglu1 wants to merge 1 commit into
apache:masterfrom
jtuglu1:implement-strict-tier-aware-load-handoff-status

Conversation

@jtuglu1
Copy link
Copy Markdown
Contributor

@jtuglu1 jtuglu1 commented May 28, 2026

Description

Currently, Druid provides no way for handoff/loadstatus to track whether ≥ 1 segment replica exists in every tier a non-zero load rule exists for that segment's datasource. This provides a flag mechanism strictTierAwareSegmentLoad=true/false which scopes both handoff and loadstatus coordinator endpoints relative to this condition. This is particularly useful in the following cases:

  1. You want to delay handoff of segments from realtime/batch tasks until the data is available in N > 1 distinct historical tiers to avoid data inconsistency issues between querying both tiers separately (e.g. data loading on a faster tier might surface the same data faster to queries before the slower tier).
  2. You want to ensure high data availability (for example striping data across tiers mapped to specific AZs), and ensure that data is not surfaced to users until all AZ tiers have a copy.

Release note


Key changed/added classes in this PR
  • MyFoo
  • OurBar
  • TheirBaz

This PR has:

  • been self-reviewed.
  • added documentation for new or modified features or behaviors.
  • a release note entry in the PR description.
  • added Javadocs for most classes and all non-trivial methods. Linked related entities via Javadoc links.
  • added or updated version, license, or notice information in licenses.yaml
  • added comments explaining the "why" and the intent of the code wherever would not be obvious for an unfamiliar reader.
  • added unit tests or modified existing tests to cover new code paths, ensuring the threshold for code coverage is met.
  • added integration tests.
  • been tested in a test Druid cluster.

Comment on lines +373 to +383
final DataSegment dataSegment = new DataSegment(
dataSource,
Intervals.of("2018-01-02/P1D"),
"v1",
null,
null,
null,
null,
0x9,
0
);
Comment on lines +1911 to +1921
final DataSegment loadedOnAllTiers = new DataSegment(
TestDataSource.WIKI,
new Interval(now.minusDays(5), Period.days(1)),
"",
null,
null,
null,
null,
0x9,
10
);
Comment on lines +1922 to +1932
final DataSegment missingTier = new DataSegment(
TestDataSource.WIKI,
new Interval(now.minusDays(4), Period.days(1)),
"",
null,
null,
null,
null,
0x9,
20
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants