/srv/irclogs.ubuntu.com/2013/01/03/#launchpad-dev.txt

StevenKAnd I lose buildbot bingo rather spectacularly.00:26
StevenKrick_h_: No fair if you force it.00:26
rick_h_StevenK: I didn't touch it :P00:40
=== slank is now known as slank_away
StevenKwgrant: Haha, it takes DF 13 minutes to work out the source size of the primary archive.01:46
StevenKI daresay binary size is far worse.01:48
wgrantQuite01:48
wgrantStevenK: Oh, why didn't you just trivially fix that rev rather than reverting it?01:49
StevenKI saw multiple issues in the failures01:49
wgrantWasn't it all just the webservice.py import removals?01:49
StevenKI wasn't sure01:50
StevenKQuicker to revert and reland01:50
StevenK(After checking, if I care)01:50
StevenKwgrant: So we can't do the repository size in the request, and we can't do it in a job, and it's too slow for the publisher :-(01:51
wgrantIndeed01:52
StevenKWe could possibly denorm published size onto spph and bpph01:52
StevenKAnd then just traverse that01:52
wgrantThat would change the definition substantially (and probably fatally), and not be hugely fast anyway01:52
StevenKWe're running out of places we can do it :-(01:53
wgrantIt will probably require a redefinition of what an archive's size means, or a (archive, filename)ish denormalised table01:53
wgrantNeither of which is easy01:53
wgrantPick another bug :)01:53
StevenKEh, it answers the question you asked last time I bought it up01:54
wgrantWhat was the question?01:54
wgrantI'm pretty sure I said it was probably too slow to ever calculate fully in one hit very much01:54
StevenK"How long does it take to calculate the size for the primary archive, if we do it in the publisher?"01:55
StevenKOr so01:55
wgrantWell01:55
wgrantIf I did pose that question, it was mostly to demonstrate that it was dreadfully slow01:55
StevenKWhich makes the answer 'an eon or so'01:55
wgrantAnd so your approach was invalid01:55
StevenKwgrant: Are you working on the +sharing critical?01:56
wgrantNo01:56
wgrantBut it's trivial, so feel free01:56
wgrantWhile you're there you should also check that the unused AP pruner will DTRT in terms of Product.information_type01:57
* StevenK watches kanban choke his browser01:58
wgrantStevenK: That doesn't look very constant...02:38
lifelessits slow cause its cold cache IO02:46
wgrantNope02:46
wgrantUnless cold cache magically causes 40 repetitions02:46
lifelessrepo size stuff02:46
lifelessback up an hour02:47
wgrantOh, yeah, obviously02:47
wgrantThere's a lot of rows02:47
wgrantMost of which won't be poked much02:47
lifelessO(files) will always be slow for that02:47
wgrantSo the cache will always be slow02:47
wgrants/cache/query/02:47
lifelessyou need sublinear scaling for that one.02:47
wgrantYes02:47
wgrantOf course02:47
wgrantThat's what i said :)02:47
wgrantIt needs a complete redesign02:47
wgranthence defer02:47
lifelesse.g. event based recalc and a cached value.02:47
wgrantPrecisely02:47
wgrantBut it's too slow to even do event-based full recalc in the current model02:48
wgrantSo it needs to be reworked even further02:48
lifelesswgrant: !cite02:48
lifeless[its not clear to me that thats the case]02:48
wgrantLet's say 20k binaries per DAS02:50
wgrantAverage of 5 or 6 DASes per series02:50
wgrantMaybe 6 published series at a time02:50
wgrant+ 20k sources per series02:50
wgrantSo that's >600k pubs for the primary archive02:51
wgrantWhich isn't huge02:51
StevenKAnd an average of 3 files per publication02:51
wgrantBut we don't need that hot02:51
wgrantSo we should keep it cold if we can02:51
wgrantStevenK: Not quite, due to binaries it'll be more like 1.5-2 I suspect02:51
StevenKwgrant: Then you have things like linux and firefox that build 10,000 binaries02:52
wgrantThere are better things to keep in wildcherry's cache than millions of Ubuntu rows02:52
wgrantWhen we can relatively easily cache02:52
wgrantSimilar to branchrevision02:53
lifelesshow often does the primary archive do deletes (vs updates) ?02:53
wgrantHaving to keep that hot for anything to work is completely completely stupid02:53
wgrantlifeless: > hourly02:53
wgrantSince stuff gets superseded02:53
lifelesssure02:53
StevenKp-d-r is seperate from the publisher02:53
lifelessso what I'd be inclined to do is to use something like twitters graph thing to keep this hot02:54
lifelessand have a size calculating spout02:54
wgrantSo02:54
lifelesshot as in live in-memory on a small number of machines02:54
wgrantThings we can deploy in the next 5 years02:54
lifelessheh :)02:54
wgrant - Not a Twitter graph thing02:54
wgrantWe need a solution to this in the next 12 months02:54
StevenKSo I think the current query works fine for small PPAs. But it scales horribly02:54
wgrantSo deploying anything exotic is entirely out of the question02:55
wgrantAnd wildcherry has enough cache issues as it is02:55
lifelessyou don't need to query wildcherry02:57
StevenKwgrant: So we create a proprietary project, set it to public and make certain a PUBLIC AccessPolicy wasn't created?03:04
wgrantStevenK: Yes03:06
wgrantStevenK: So, more work required on +queue :(03:08
StevenK:-(03:08
StevenKIt still makes too many queries?03:08
StevenKDONE precise on qas is 12903:09
StevenKWhich is like 1/3rd03:09
wgrant24 PackageBuild queries, plus lots of other stuff03:09
wgranthttps://oops.canonical.com/oops.py/?oopsid=OOPS-566218b1efc27aca3c77c68091a09d8303:10
StevenKYeah, I just read the query log on qas03:11
StevenKThe lowest hanging fruit is certainly PackageBuild03:11
StevenKwgrant: Hm, now I remember. I couldn't get my test cases to make the PB queries so I moved on.03:14
wgrantYou clearly need more PUBs03:18
StevenK15 isn't enough?03:19
wgrantSo03:21
wgrantWork out where the PB queries come from03:21
wgrantThen work out why they aren't appearing in your test03:21
StevenKwgrant: However, we can slam the two bugs back to In Progress and qa-ok03:23
wgrantYes03:23
StevenKwgrant: Based on my reading of the code, the 16 PUBLIC APs won't be deleted, there are probably APGs holding them in03:31
wgrantStevenK: APGs don't hold them03:34
wgrantOnly APAs and sharing policies do03:34
wgrantBut the sharing policies will probably keep them03:35
StevenKWe can fix those up without a code change, though?03:36
wgrantWell, we'll delete them manually03:36
wgrant_pruneUnusedPolicies keeps anything that's permitted by a sharing policy.03:37
wgrantIncluding any public types that shouldn't have had an AP in the first place.03:37
StevenKwgrant: I'm confused, do we need a code change to clean up? Or when you say delete you mean "DELETE FROM" ?03:39
wgrantWe could switch _pruneUnusedPolicies to always prune policies that are public, but that's pointless because they shouldn't exist in the first place03:40
wgrantIt would be best to SQL them away manually03:40
StevenK'if not self.obj.archive.private' causes PB lookups? :-(03:50
wgrantSure03:50
wgrantArchive is on PB03:50
StevenKwgrant: Sure, but from ViewSourcePackageRelease ?03:51
wgrantUm03:51
wgrantSPR.archive doesn't exist03:51
wgrantSo no, you're wrong :)03:51
wgrantSounds more like ViewBinaryPackageBuild03:52
wgrantIndeed03:52
StevenKRight03:52
StevenKPerhaps self.factory.makeBuildPackageUpload is missing some bits, then03:54
StevenKwgrant: https://code.launchpad.net/~stevenk/launchpad/no-public-for-all-projects/+merge/14170004:35
wgrantStevenK: _prepare_to_set_sharing_policy already knows how to restrict it to just private types04:43
wgrantWe shouldn't duplicate that logic.04:43
StevenKLet me move into _ensurePolicies then04:46
StevenKwgrant: http://pastebin.ubuntu.com/1490688/04:48
wgrantSounds reasonable04:49
StevenKwgrant: Actually, http://pastebin.ubuntu.com/1490691/04:50
wgrantIndeed04:53
StevenKOh wonderful, I think I've broken diff generation for that MP05:09
StevenKAh, look at that.05:17
StevenKwgrant: Can haz +1 now?05:17
StevenKMismatchError: queries do not match: 52 != 8705:31
StevenKSuccess05:31
wgrantStevenK: Done05:33
wgrantWhat did you eliminate?05:33
StevenKI eliminated nothing. I reached into the BPB's BPR and called addFile05:34
wgrantAh05:35
StevenKwgrant: And sorry for my OCD forcing +39/-41 on you :-)05:35
StevenKRight, preloading PB gets us down to 7305:37
StevenKwgrant: http://pastebin.ubuntu.com/1490769/ gets us to 30 queries on the API, and 57 on the web05:46
=== almaisan-away is now known as al-maisan
StevenKWe don't really need to preload PBs, Components and Sections in getAll(), but it was trival.05:48
wgrantgetAll should basically only be used by getPackageUploads and +queue, right?05:49
wgrantSo it's probably not too bad to aggressively preload05:49
StevenKPretty much, yes05:49
StevenKI'd like to preload away the PackageDiff stuff, but that doesn't look easy05:50
wgrantI thought you already looked at doing that05:50
wgrantOh right, you gave up after I told you your trivial implementation wouldn't work?05:50
StevenKI did, yes05:50
StevenKwgrant: If you're happy enough with that diff I can put together an MP?05:51
wgrantIIRC it just iterates over SPR.package_diffs05:52
wgrantWhich is going to be relatively easily to cachedpropertyify05:52
* StevenK peers05:52
wgrantIt's been a while since I was over there05:52
wgrantBut I don't see why it would do otherwise05:53
wgrantYeah05:53
wgrantwgrant@lplucid:~/launchpad/lp-branches/devel$ bzr grep package_diffs lib/lp/soyuz/templates/05:53
wgrantlib/lp/soyuz/templates/distroseries-queue.pt:      <tr tal:define="diffs packageupload/sourcepackagerelease/package_diffs"05:53
wgrantlib/lp/soyuz/templates/sourcepackagerelease-diffs.pt:       tal:define="diffs context/package_diffs"05:53
wgrantcachedproperty05:53
wgrantdone05:53
wgrant(well, plus a couple of lines here and there to prepopulate and invalidate)05:53
StevenKIt's a SQLMutlipleJoin, so I can cheat by _package_diffs, or rewrite to something actually using IStore05:54
StevenKSQLMultipleJoin, even05:54
wgrantIt's unlikely that much actually cares that it's an SQLMultipleJoin05:55
wgrantIt can probably be turned into a simple cachedproperty list, but you'll have to look at the other callsites05:55
wgrantSeem to be only 5 non-test callsites05:57
wgrantez05:57
StevenKwgrant: Eh, easy enough to copy the pattern that PackageUpload uses with sources vs _sources05:58
wgrantAs I said in the last MP, that's pretty pointless05:59
wgrantIf nothing needs a resultset then a resultset need not be exposed at all05:59
wgrantNever expose unnecessary interfaces05:59
wgrantOr you end up with something like Launchpad :)05:59
wgrant(it appears that none of the callsites will notice if you make it a lisT)06:00
StevenK+    @cachedproperty06:00
StevenK+    def package_diffs(self):06:00
StevenK+        return list(self._package_diffs)06:00
wgrantBad StevenK06:01
StevenKAh ha, so you *do* want the destruction of the SQLMultipleJoin06:01
wgrantIt's pointless to keep it06:01
wgrantreturn list(Store.of(self).find(PackageDiff, to_source=self).order_by(Desc(PackageDiff.date_requested)))06:02
wgrantdone06:02
StevenKRight, which I was in the middle of typing when you said that ...06:04
StevenKwgrant: Not sure where to invalidate SPR.package_diffs, but that preloading gets us to 53 queries.06:17
StevenKExcept that the LFA and LFC preloading helps not at all06:17
wgrantDId you preload the correct LFAs and LFCs?06:20
wgrantwgrant@lplucid:~/launchpad/lp-branches/devel$ bzr grep '\bPackageDiff\('06:20
wgrantlib/lp/soyuz/model/packagediff.py:class PackageDiff(SQLBase):06:20
wgrantlib/lp/soyuz/model/sourcepackagerelease.py:        return PackageDiff(06:20
wgrantlib/lp/testing/factory.py:            PackageDiff(06:20
StevenKEasy06:22
wgrantHuh06:39
wgrantI just removed all the writable bits of the BuildFarmJob and PackageBuild security configuration06:40
wgrantAnd the only tests that appear to fail are those that test the permissions directly06:40
lifeless\o/06:53
czajkowskialoha08:50
=== al-maisan is now known as almaisan-away
adeuringood morning09:11
czajkowskiadeuring: hopefuly not an odd morning either :)09:12
adeuringczajkowski: yeah: i need to clean my keayboard from tobacco crumbs...09:13
adeuringbrb09:15
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
=== yofel_ is now known as yofel
=== slank_away is now known as slank
=== Ursinha-afk is now known as Ursinha
czajkowskirick_h_: http://i.imgur.com/OWtoF.jpg16:05
rick_h_czajkowski: I'm sending help, hold on tight!16:05
=== deryck is now known as deryck[lunch]
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
=== BradCrittenden is now known as bac
=== deryck[lunch] is now known as deryck
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
sinzuibuildbot is seriously harshing my mellow21:00
czajkowskisinzui: I'm going to go with that's not a good mellow22:32

Generated by irclog2html.py 2.7 by Marius Gedminas - find it at mg.pov.lt!