← Back to team overview

launchpad-reviewers team mailing list archive

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

 

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

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

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

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/64783
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/db-add-bprc into lp:launchpad/db-devel.
=== 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 05:01:14 +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);


Follow ups