- 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.
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
DROP INDEX IF EXISTS idx_provisioner_daemons_name_owner_key; | ||
ALTER TABLE ONLY provisioner_daemons | ||
ADD CONSTRAINT provisioner_daemons_name_key UNIQUE (name); |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
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 commentThe 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 commentThe reason will be displayed to describe this comment to others.Learn more. We need to at least keep the existing unique index on name. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others.Learn more. Gotcha, I ignored the use case with multiple users 👍 Thanks | ||
ON provisioner_daemons | ||
USING btree (name, lower((tags->>'owner')::text)); | ||
COMMENT ON INDEX idx_provisioner_daemons_name_owner_key | ||
IS 'Relax uniqueness constraint for provisioner daemon names'; | ||
Some generated files are not rendered by default. Learn more abouthow customized files appear on GitHub.
Uh oh!
There was an error while loading.Please reload this page.
Uh oh!
There was an error while loading.Please reload this page.