Skip to content

fix: use provider that is called at query time instead of constructor - #20537

Open
capistrant wants to merge 1 commit into
apache:masterfrom
capistrant:DartWorkerService-fixup
Open

capistrant wants to merge 1 commit into
apache:masterfrom
capistrant:DartWorkerService-fixup

Conversation

@capistrant

Copy link
Copy Markdown
Contributor

fixes a latent bug in #20508 where eagerly setting up the discovery provider at construction time could result in a guice error. Using the provider at query time should be ok I think

@github-actions github-actions Bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Oct 9, 2026

@kgyrtkirk kgyrtkirk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would be nice to have a test - but I understand that it might be more complicated than the fixing it

protected final MemoryIntrospector memoryIntrospector;
protected final List<InputSpecSlicerProvider> inputSpecSlicerProviders;
protected final ServiceEmitter emitter;
protected final DruidNodeDiscovery dartWorkerDiscovery;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

note: I think it might worth a try to add an annotated DruidNodeDiscovery similar to @Dart ; and declare a method do produce that in a guice module... and depend on that

that way guice will see that factorization happening and could plan it into the construction timeline of this object (or error out with some reasoning )

@FrankChen021 FrankChen021 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

No actionable issues found. Deferring the discovery lookup to query-context creation avoids requiring a started discovery provider during Guice construction. The provider caches the service-and-role discovery handle safely across queries, and Dart message relays request the same handle during lifecycle startup.

Reviewed 1 of 1 changed files, including adjacent discovery-provider caching, lifecycle wiring, query call sites, and controller tests. Static review; no tests were run.


This is an automated review by Codex GPT-5.6-Luna(max)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants