Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make MSQ tests run faster #17718

Merged
merged 10 commits into from
Feb 13, 2025
Merged

Conversation

kgyrtkirk
Copy link
Member

most of the time msq tests are not even using the cpu - they are just waiting...

the following are changed to increase their speed to be comparable to the native engine's tests:

  • MSQWorkerTaskLauncher was wasting a lot of time waiting a 100ms between checks
  • segments are not anymore reindexed every time they are accessed
  • made an executor static - to avoid polluting the jvm with left behind threads

this have enabled to execute *Calcite* in the msq module in 52s instead of the usual 6 min 32 sec

@github-actions github-actions bot added Area - Batch Ingestion Area - MSQ For multi stage queries - https://github.com/apache/druid/issues/12262 labels Feb 12, 2025
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.

Seems fine, I'll approve this since it's an improvement. Please do look at the line comments though and fix the spelling errors.

Also, even though this patch is fine, I do want to note that ideally we shouldn't even use MSQWorkerTaskLauncher at all in SQL tests. The ideal setup would be a test-specific WorkerManager for those. MSQWorkerTaskLauncher itself could be tested in more targeted tests (i.e. testing it directly, not using it as part of the SQL setup).

@@ -353,13 +354,19 @@ public WorkerManager newWorkerManager(
WorkerFailureListener workerFailureListener
)
{
MSQWorkerTaskLauncherConfig taskLauncherConfig = new MSQWorkerTaskLauncherConfig();
taskLauncherConfig.highFrequenceCheckMillis = 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

0 means busy loop, which seems excessive; how about 1?

Copy link
Member Author

Choose a reason for hiding this comment

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

setting it to 1 adds 1s for ~500 cases; it would be nice if it would execute a sleep(0) instead of skipping the sleep entirely

set it to 1 for now

@kgyrtkirk kgyrtkirk merged commit 512b70c into apache:master Feb 13, 2025
40 checks passed
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.

2 participants