← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] lp:~stevenk/launchpad/db-add-bprc into lp:launchpad

 

Steve Kowalik has proposed merging lp:~stevenk/launchpad/db-add-bprc into lp:launchpad.

Requested reviews:
  Stuart Bishop (stub): db
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~stevenk/launchpad/db-add-bprc/+merge/64782

Add a new table, BinaryPackageReleaseContents.

Currently, Contents generation (for example, the file at http://archive.ubuntu.com/ubuntu/dists/natty/Contents-amd64.gz) is generated every day, where it stops the publisher from running, and takes an hour or slightly more.

This table completes the first step of moving contents generation into the database, and lets it do the heavy lifting, rather than cocoplum's disk. This also gives us the opportunity to perform Contents generation for PPAs.

The next step of the plan is to have a garbo script that slowly populates this table (but not yet, since it will be large).

The end goal is to move Contents generation into the publisher itself, where it will query the table by a list of BPRs and get back every single filename that the BPRs contain.
-- 
https://code.launchpad.net/~stevenk/launchpad/db-add-bprc/+merge/64782
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/db-add-bprc into lp:launchpad.
=== modified file 'database/schema/archive/patch-2207-06-0.sql'
--- database/schema/archive/patch-2207-06-0.sql	2011-06-14 14:21:10 +0000
+++ database/schema/archive/patch-2207-06-0.sql	2011-06-16 04:59:25 +0000
@@ -55,7 +55,7 @@
 FROM packagesetgroup WHERE packageset.name = 'lucid-' || packagesetgroup.name;
 
 -- ** PART 3 ** Add the 'packageset.distroseries' foreign key and
---              initialise it for the existing package sets.
+--              initialize it for the existing package sets.
 
 -- A package set lives in a distro series context.
 ALTER TABLE ONLY packageset ADD COLUMN distroseries integer;

=== modified file 'database/schema/patch-2208-10-0.sql'
--- database/schema/patch-2208-10-0.sql	2011-06-14 14:21:10 +0000
+++ database/schema/patch-2208-10-0.sql	2011-06-16 04:59:25 +0000
@@ -3,7 +3,7 @@
 
 SET client_min_messages=ERROR;
 
--- The `InitialiseDistroSeriesJob` table captures the data required for an ifp job.
+-- The `InitializeDistroSeriesJob` table captures the data required for an ifp job.
 
 CREATE TABLE DistributionJob (
     id serial PRIMARY KEY,

=== added file 'database/schema/patch-2208-73-1.sql'
--- database/schema/patch-2208-73-1.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-73-1.sql	2011-06-16 04:59:25 +0000
@@ -0,0 +1,11 @@
+-- Copyright 2011 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+-- Use American English.
+
+ALTER INDEX distribution_job__initialise_series__distroseries
+  RENAME TO distribution_job__initialize_series__distroseries;
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 73, 1);

=== added file 'database/schema/patch-2208-99-0.sql'
--- database/schema/patch-2208-99-0.sql	1970-01-01 00:00:00 +0000
+++ database/schema/patch-2208-99-0.sql	2011-06-16 04:59:25 +0000
@@ -0,0 +1,12 @@
+-- Copyright 2011 Canonical Ltd.  This software is licensed under the
+-- GNU Affero General Public License version 3 (see the file LICENSE).
+
+SET client_min_messages=ERROR;
+
+CREATE TABLE BinaryPackageReleaseContents (
+    binarypackagerelease integer REFERENCES BinaryPackageRelease,
+    filename text,
+    PRIMARY KEY (binarypackagerelease, filename)
+);
+
+INSERT INTO LaunchpadDatabaseRevision VALUES (2208, 99, 0);