- Notifications
You must be signed in to change notification settings - Fork1k
fix: reduce impact of GetPrebuildMetrics on database#19694
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
Uh oh!
There was an error while loading.Please reload this page.
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM 👍
It'd be helpful to share query analyses to justify this change either in this PR's description or in the linked issue.
As an aside: I wonder why we don't have an FK frominitiator_id
tousers
onworkspace_builds
. I checked in dogfood and there aren't any records where aninitiator_id
does not match ausers
id.
Likewise forprovisioner_jobs
.
Uh oh!
There was an error while loading.Please reload this page.
I added some additional details to the linked issue 👍 |
Signed-off-by: Callum Styan <callumstyan@gmail.com>
Signed-off-by: Callum Styan <callumstyan@gmail.com>
570880f
to6c9ad14
CompareSigned-off-by: Callum Styan <callumstyan@gmail.com>
0ec9df3
intomainUh oh!
There was an error while loading.Please reload this page.
seecoder/internal#959 but the tl; dr is:
In reality this should likely just be a Prometheus metric, and Prometheus can handle the counter reset behaviour at query time, but for now this should at least cut the load of the query to 25% of it's current impact.