launchpad-reviewers team mailing list archive
-
launchpad-reviewers team
-
Mailing list archive
-
Message #05268
[Merge] lp:~stevenk/launchpad/distribution-+ppa-timeout into lp:launchpad
Steve Kowalik has proposed merging lp:~stevenk/launchpad/distribution-+ppa-timeout into lp:launchpad.
Requested reviews:
Launchpad code reviewers (launchpad-reviewers)
Related bugs:
Bug #790535 in Launchpad itself: "Distribution:+ppas timeouts"
https://bugs.launchpad.net/launchpad/+bug/790535
For more details, see:
https://code.launchpad.net/~stevenk/launchpad/distribution-+ppa-timeout/+merge/79769
Remove the ValidPersonOrTeamCache join from IDistribution.searchPPAs().
Joining a large table like Archive against a view that ultimately backs onto Person is not going to be filled with win and rainbows. I assert that we don't lose much by not doing the JOIN, and indeed, if we disable any PPAs when a user is deactivated, then it was pointless.
Sadly, I can not come up with a way to test this change.
--
https://code.launchpad.net/~stevenk/launchpad/distribution-+ppa-timeout/+merge/79769
Your team Launchpad code reviewers is requested to review the proposed merge of lp:~stevenk/launchpad/distribution-+ppa-timeout into lp:launchpad.
=== modified file 'lib/lp/registry/model/distribution.py'
--- lib/lp/registry/model/distribution.py 2011-10-07 16:20:20 +0000
+++ lib/lp/registry/model/distribution.py 2011-10-19 05:37:25 +0000
@@ -1322,11 +1322,9 @@
"""See `IDistribution`."""
clauses = ["""
Archive.purpose = %s AND
- Archive.distribution = %s AND
- Archive.owner = ValidPersonOrTeamCache.id
+ Archive.distribution = %s
""" % sqlvalues(ArchivePurpose.PPA, self)]
- clauseTables = ['ValidPersonOrTeamCache']
orderBy = ['Archive.displayname']
if not show_inactive:
@@ -1363,8 +1361,7 @@
"Archive.private = FALSE AND Archive.enabled = TRUE")
query = ' AND '.join(clauses)
- return Archive.select(
- query, orderBy=orderBy, clauseTables=clauseTables)
+ return Archive.select(query, orderBy=orderBy)
def getPendingAcceptancePPAs(self):
"""See `IDistribution`."""