- Notifications
You must be signed in to change notification settings - Fork1k
feat(coderd/database): add UpsertProvisionerDaemons query#11178
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
ALTER TABLE ONLY provisioner_daemons | ||
DROP CONSTRAINT IF EXISTS provisioner_daemons_name_key; | ||
CREATE UNIQUE INDEX IF NOT EXISTS idx_provisioner_daemons_name_owner_key |
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.
Out of curiosity, do we need an index since Day 1? What was the upper limit of provisioner daemons we hit in scaletests?
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.
We need to at least keep the existing unique index on name.
However, this will allow multiple user-level provisioners to be named "my-provisioner".
Otherwise, each user will have to choose a unique provisioner name.
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.
Gotcha, I ignored the use case with multiple users 👍 Thanks
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.
MutateTags seems to be a bit tangled, but as you have covered it with tests, I'm 👍
Uh oh!
There was an error while loading.Please reload this page.
Part of#10676