← Back to team overview

launchpad-reviewers team mailing list archive

Re: [Merge] ~pappacena/launchpad:hot-gitrepo-status-column into launchpad:master

 


Diff comments:

> diff --git a/database/schema/patch-2210-17-1.sql b/database/schema/patch-2210-17-1.sql
> new file mode 100644
> index 0000000..8cd7655
> --- /dev/null
> +++ b/database/schema/patch-2210-17-1.sql
> @@ -0,0 +1,14 @@
> +-- Copyright 2020 Canonical Ltd.  This software is licensed under the
> +-- GNU Affero General Public License version 3 (see the file LICENSE).
> +
> +SET client_min_messages=ERROR;
> +
> +-- Status "2" is GitRepositoryStatus.AVAILABLE
> +UPDATE GitRepository SET status = 2 WHERE status IS NULL;

I'm sceptical about this, because it will lock the whole table.  We normally use garbo for this sort of thing because it avoids that problem.  I've asked William to check me on whether it's a practical problem in this case.

> +
> +ALTER TABLE GitRepository
> +    ALTER COLUMN status SET NOT NULL;
> +
> +CREATE INDEX gitrepository__status__idx ON GitRepository (status);
> +
> +INSERT INTO LaunchpadDatabaseRevision VALUES (2210, 17, 1);


-- 
https://code.launchpad.net/~pappacena/launchpad/+git/launchpad/+merge/385198
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/launchpad:hot-gitrepo-status-column into launchpad:master.


References