Skip to content

minor: restore query ID verification in MSQ workers - #20530

Open
nanjeshramesh wants to merge 1 commit into
apache:masterfrom
nanjeshramesh:msq-restore-query-id-verification
Open

nanjeshramesh wants to merge 1 commit into
apache:masterfrom
nanjeshramesh:msq-restore-query-id-verification

Conversation

@nanjeshramesh

Copy link
Copy Markdown
Contributor

Fixes #16894.

Description

#16886 removed the query ID verification from MSQ workers because, until Druid 30, the query IDs of individual stages could be random UUIDs instead of the real query ID (fixed in #16168). A newer worker talking to a controller from one of those versions would then fail the check. The issue asks for the check to come back once Druid 34 is released, and the latest stable release is now 38, so this restores it.

WorkerImpl.KernelHolders checks again that the query ID of a stage matches the worker's query ID when a kernel is added, finished, removed or looked up, using the same verifyQueryId helper as before #16886. The note about the old bug that #16886 added to the StageId Javadoc is removed.

This is the inverse of #16886 applied to the current file location, so the check is exactly what it was before.

Key changed/added classes in this PR
  • WorkerImpl
  • StageId

I did not add a new test. The check runs on every stage of the existing end to end tests, and WorkerImplTest, DartWorkerRunnerTest, RunWorkOrderTest, MSQSelectTest, MSQInsertTest, MSQFaultsTest and MSQWindowTest all pass with it (866 tests), with checkstyle clean.

This PR has:

  • been self-reviewed.

@github-actions github-actions Bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Oct 8, 2026
@nanjeshramesh nanjeshramesh changed the title chore: restore query ID verification in MSQ workers minor: restore query ID verification in MSQ workers Oct 8, 2026
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.

Add back Query ID verification check from MSQ workers

1 participant