/srv/irclogs.ubuntu.com/2013/05/21/#launchpad-dev.txt

wgrantStevenK: I return03:01
lifelessand therefor you are?03:01
StevenKwgrant: Just as I'm about to go to lunch, nice work. :-P03:02
StevenKwgrant: I thought ? and params=(list,) were allergic?03:02
wgrantStevenK: Ah, indeed. Though you can easily Stormify the outer bit of that and just use SQL for the inner bit, or even add FOR UPDATE/SHARE support to Select in about 4 lines of code.03:04
StevenKOr I could ignore it and make you twitch03:06
StevenKwgrant: http://pastebin.ubuntu.com/5685858/ btw03:46
wgrantStevenK: Does that work?03:52
wgrantOh, I guess it does.03:53
wgrantBecause all the SSs that we touch will have BSFs at the start.03:53
StevenKExactly. And possibly none of them will at the end.03:53
wgrantStevenK: However, does that query at the start perform adequately?03:54
wgrantIt would be more reliable to filter on SS ID in the outer query03:55
wgrantRather than relying on the planner to guess that the inner query results in extremely good selectivity.03:55
StevenKRequires a JOIN in the outer query, ids == BSF not SS03:55
wgrantOr obtain the IDs first, since you need them anyway03:56
StevenKI had that, you said I should get them from the FOR SHARE query ... :-)03:56
StevenKBleh, do I need execute_zcml_for_scripts to do IStore(BranchMergeProposal) ?03:56
wgrantYou need the component architecture, yes.03:57
* StevenK stabs Zope03:57
=== tasdomas_afk is now known as tasdomas
wgrantStevenK: http://pastebin.ubuntu.com/5685908/04:36
StevenKHaha04:37
StevenKI see you took the easy way of using FOR SHARE too04:37
StevenKwgrant: Your filter_expr is too late04:38
StevenKWe've already deleted some BSFs by then04:38
wgrantStevenK: Why is that a problem?04:38
wgrantIt's a NOT EXISTS at that point04:38
StevenKAh04:39
wgrantIt only locks the first row that it finds, since a NOT EXISTS obviously fails as soon as it finds a row, but that's fine for our needs.04:42
StevenKwgrant: My MP script of doom is almost done too04:47
StevenKThen we'll see PreviewDiffPruner likes a large dataset04:47
wgrant:)04:51
StevenK2 PDs for MP 86305:08
StevenK4 PDs for MP 86105:08
StevenKCome on!05:08
StevenK29005:08
StevenKOh, I think it's commint05:09
StevenK*commiting05:09
wgrantStevenK: Going OK?05:17
StevenKI think it's still commiting05:19
wgrantThat's very unlikely05:19
wgrantCommitting is cheap05:19
wgrantSELECT * FROM pg_stat_activity;05:20
StevenK<IDLE> in transaction05:21
wgrantWhat's the query start time?05:21
StevenK2013-05-21 04:09:56.441673+00 | 2013-05-21 04:09:56.448991+00 | 2013-05-21 05:21:26.137095+0005:21
wgrantThat's session | transaction | query05:22
wgrant?05:22
StevenKbackend_start         |          xact_start           |          query_start05:22
wgrantSo yes05:22
wgrantYou're not running $script with LP_DEBUG_SQL?05:23
StevenKNope05:23
wgrantIf this is local, enable statement logging in postgres05:23
StevenKDF05:23
wgrantIf it's on DF, god help you.05:23
wgrantAh05:23
StevenKIt's adding an average of 3 PDs for every MP05:23
StevenK(But only one actual diff, so the rest are just rows in PD)05:24
wgrantI just caught it doing an INSERT05:24
wgrantMP 12889705:24
wgrantIt's very slow05:24
wgrantWhere's the code?05:24
StevenKcodebase-current/foo, it's incredible naive05:25
StevenKincredibly05:25
StevenKAwwww05:25
StevenKIt just threw MemoryError05:26
wgrantYeah05:26
wgrantIt used all RAM05:26
wgrantI saw it at 75%05:26
wgrantCommit in batches05:26
StevenKI would if you'd close it05:27
wgrantDone05:27
StevenKwgrant: Look sensible?05:28
wgrantStevenK: I'd do more like 2000, but doesn't really matter, so go ahead :)05:32
wgrantStevenK: It might still fail due to StupidCache, but it's worth a try05:33
StevenKwgrant: I'd bump it to 2000, but you like leaving vim running05:34
wgrantStevenK: E!05:34
StevenKHah05:36
StevenK3 PDs for MP 16088205:36
StevenK4 PDs for MP 16088105:36
StevenK5 PDs for MP 16088005:36
StevenKCommit05:36
StevenKAh, look at that06:06
wgrantHm?06:07
StevenKIt finished06:07
StevenKAnd I think we have OMGLOTS of previewdiffs to kill06:08
StevenKSELECT count(*) FROM previewdiff WHERE EXTRACT(year FROM date_created) =  2001; => 57085206:10
wgrant:)06:11
StevenK2013-05-21 06:12:14 DEBUG2  [PreviewDiffPruner] Iteration 14 (size 10000.0): 1.226 seconds06:12
StevenK2013-05-21 06:13:06 DEBUG2  [PreviewDiffPruner] Iteration 64 (size 10000.0): 0.002 seconds06:13
StevenK2013-05-21 06:13:06 DEBUG2  [PreviewDiffPruner] Done. 584116 items in 65 iterations, 68.688814 seconds, average size 8986.402205 (8503.80299128/s)06:13
StevenKwgrant: So, I will put up a branch tomorrow with 44-4 that adds the two indices on pd and id.06:13
wgrantStevenK: Sounds good06:14
StevenKAnd PDP is already hellishly fast, so that's handy06:14
StevenKIt took 30 minutes to add them and 60 seconds to delete them06:14
wgrantThe deletion is optimised SQL06:14
wgrantThe insertion was awful Python06:14
StevenKs/awful/naive/ :-)06:15
wgrantNo, the script wasn't bad, but the LP infrastructure is06:15
StevenKwgrant: News at 11 :-P06:22
StevenKHaha06:22
StevenKDiffPruner punted the lone diff I added too06:22
wgrant:)06:22
StevenK2013-05-21 06:14:10 DEBUG2  [DiffPruner] Iteration 0 (size 1.0): 132.183 seconds06:23
StevenKI'm guessing DF wasn't so happy06:23
StevenKOh, it might have been transaction blocked06:23
StevenKGiven that time is extremly close to the entire runtime06:23
wgrantMore likely that it includes the time to calculate the condemned IDs06:24
wgrantStevenK: Are these in -daily?06:24
StevenKThey both are, yes06:24
wgrantGood06:24
StevenKI wasn't sure how heavyweight they would be, and we don't buy anything with them in hourly06:25
StevenKwgrant: If you're happy to accept r=sinzui on that MP, the changes you suggested have been pushed for a while.06:29
wgrantI was hoping to relayer lp.bugs.m.bsf and .ss, but they're too intertangled, so I guess that will have to do06:45
wgrantStevenK: r=me06:46
wgrantStevenK: For QA, I'd recomment running a harness with LP_DEBUG_SQL and trying a deletion06:47
wgrantThe queries are designed to be very fast, but we should check that I didn't miss something06:47
=== liam_ is now known as Guest39447
czajkowskijtv: you alive....09:00
jtvczajkowski: barely... this particular jet lag always gets me in a weird way, where for a while I think I'm off the hook and then it just comes back.09:12
czajkowskijtv: tomorrow could you look at https://answers.launchpad.net/launchpad/+question/229157 please....09:12
jtvOK09:12
czajkowskithanks09:13
jtvStevenK: any chance you can get at any oopses generated from this error? https://answers.launchpad.net/launchpad/+question/22915710:17
czajkowskiwgrant: ^10:20
wgrantAh10:20
wgrantI have tracebacks about that10:20
jtvI thought it'd be the plurals, but I see nothing wrong with them.10:20
jtvNor does the empty Last-Translator cause it.10:21
wgrantNo, it's something to do with the query logging, IIRC10:21
wgrantYeah10:21
wgrantThe statement issued by _getPOTMsgSetBy causes the statement logger to choke when trying to expand parameters10:21
wgrantIt first started happening yesterday10:22
wgrantOnly on empathy and webtrees10:22
wgrantHaven't had a chance to investigate yet10:24
jtvwgrant: sorry for the silence — pre-imp call.  Do we have a bug for that problem?10:38
wgrantjtv: Not yet10:41
jtvwgrant: it sounds as if there isn't much I can do for this question...  would it be OK if I handed it off to you?10:41
wgrantjtv: I'd love to say no, but sadly I cannot.10:42
wgrant:)10:42
jtv"To the first part or the second part?"  :)10:42
jtvIf there's a way I can usefully take a portion of this problem off your hands, I'd be happy to.10:43
* jtv has to relocate10:48
wgrantjtv: You can't take it off my hands, so I can't say it's not OK to hand it off to me, as much as I'd love to have it not be my problem :P10:48
jtvwgrant: then we both feel entirely the same.  That is one bright spot in the situation.  :)10:49
wgrantHeh10:49
* jtv runs10:50
=== gary_poster is now known as gary_poster|away
=== gary_poster|away is now known as gary_poster
=== tasdomas is now known as tasdomas_afk
=== tasdomas_afk is now known as tasdomas
=== wedgwood_away is now known as wedgwood
=== deryck is now known as deryck[afk]
=== BradCrittenden is now known as bac
=== stub1 is now known as stub
=== tasdomas is now known as tasdomas_afk
=== deryck[afk] is now known as deryck
=== gary_poster is now known as gary_poster|away
=== gary_poster|away is now known as gary_poster
Laneyhmm18:41
=== BradCrittenden is now known as bac
=== wedgwood is now known as wedgwood_away
=== wedgwood_away is now known as wedgwood
czajkowskiLaney: what have you broken...22:52
=== wedgwood is now known as wedgwood_away

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