Skip to content

Improve extensibility of MSQ Dart engine via extensions#19127

Open
kfaraz wants to merge 3 commits intoapache:masterfrom
kfaraz:async_timeout_util
Open

Improve extensibility of MSQ Dart engine via extensions#19127
kfaraz wants to merge 3 commits intoapache:masterfrom
kfaraz:async_timeout_util

Conversation

@kfaraz
Copy link
Contributor

@kfaraz kfaraz commented Mar 11, 2026

Description

This is a collection of minor refactors that help extensions use and override certain Dart capabilities.

Changes

  • Add utility method ServletResourceUtils.createAsyncTimeoutListener
  • Track idle duration of a Dart worker
  • Fix visibility of some methods and classes

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.

@kfaraz kfaraz requested a review from gianm March 11, 2026 07:21
@github-actions github-actions bot added Area - Batch Ingestion Area - Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Mar 11, 2026
Copy link
Contributor

@gianm gianm left a comment

Choose a reason for hiding this comment

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

Generally LGTM. One thing looked suspicious.

public DruidNodeDiscovery getForServiceAndRoles(String serviceName, Set<NodeRole> nodeRolesToWatch)
{
return serviceDiscoveryMap.computeIfAbsent(
serviceName,
Copy link
Contributor

Choose a reason for hiding this comment

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

Shouldn't the key of this map now be a combination of serviceName and nodeRolesToWatch? Otherwise, if this method is called more than once for the same service with different roles, the subsequent callers won't get the correct roles.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching this! Fixed.

@kfaraz kfaraz requested a review from gianm March 16, 2026 04:33
@kfaraz
Copy link
Contributor Author

kfaraz commented Mar 16, 2026

The flaky CompactionSupervisorTest is already being addressed here #19157

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

Labels

Area - Batch Ingestion Area - 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.

2 participants