Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

fix: optimize queue position sql query#17974

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
evgeniy-scherbina merged 4 commits intomainfromyevhenii/optimize-sql-query
May 28, 2025

Conversation

evgeniy-scherbina
Copy link
Contributor

@evgeniy-scherbinaevgeniy-scherbina commentedMay 21, 2025
edited
Loading

Use onlyonline provisioner daemons forGetProvisionerJobsByIDsWithQueuePosition query. It should improve performance of the query.

@evgeniy-scherbinaevgeniy-scherbina marked this pull request as ready for reviewMay 21, 2025 17:30
Comment on lines 12 to 13
"github.com/coder/coder/v2/coderd/provisionerdserver"

Copy link
Member

Choose a reason for hiding this comment

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

This should be grouped with the rest of thegithub.com/coder/coder/v2 imports. Also, thecdr.dev/slog import should be grouped in with those as well

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

done

@@ -80,17 +80,21 @@ pending_jobs AS (
WHERE
job_status = 'pending'
),
online_provisioner_daemons AS (
SELECT id, tags FROM provisioner_daemons pd
WHERE pd.last_seen_at IS NOT NULL AND pd.last_seen_at >= (NOW() - (@stale_interval_ms::bigint || ' ms')::interval)
Copy link
Member

Choose a reason for hiding this comment

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

This should probably be a more descriptive param likeprovisioner_daemon_stale_interval_ms

Copy link
ContributorAuthor

Choose a reason for hiding this comment

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

We use@stale_interval_ms everywhere - so I kept it for consistency.

@evgeniy-scherbinaevgeniy-scherbina merged commit110102a intomainMay 28, 2025
35 checks passed
@evgeniy-scherbinaevgeniy-scherbina deleted the yevhenii/optimize-sql-query branchMay 28, 2025 12:21
@github-actionsgithub-actionsbot locked and limited conversation to collaboratorsMay 28, 2025
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@deansheatherdeansheatherdeansheather approved these changes

@EmyrkEmyrkAwaiting requested review from Emyrk

@dannykoppingdannykoppingAwaiting requested review from dannykopping

Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

2 participants
@evgeniy-scherbina@deansheather

[8]ページ先頭

©2009-2025 Movatter.jp