/srv/irclogs.ubuntu.com/2012/08/06/#launchpad-dev.txt

StevenKSo, you have a dastardly plan?00:17
StevenKwgrant: &00:17
* StevenK grumbles at his fingers.00:17
wgrantStevenK: Yeah, testing it on DF00:25
* StevenK resurrects the redux branch00:38
wgrantStevenK: I have an equivalent that is 1ms rather than 1000ms, but I'm not sure that it is truly equivalent yet.00:52
StevenKwgrant: That was the problem? The query was taking 1 second per notification?00:54
wgrantStevenK: Calculating the structural subscribers for a private bug took 600-1200ms00:55
wgrantStevenK: And because the notification code is crap, it ran that calculation several times for a single operation.00:55
wgrantI have a query which fixes the slowness00:55
wgrantAnd I might refactor it all later to remove the duplication00:55
wgrantSince four separate bugnotificationrecipient timeouts plagued my last week00:56
StevenKwgrant: Ah, so the real smoking gun is the change in model/structuralsubscription.py00:57
wgrantStevenK: I believe so00:58
wgrantStevenK: Though dupe/etc subs may be similarly afflicted, they weren't important in this case.00:58
wgrant(probably since private bugs with dupes are relatively rare)00:58
wgrantStevenK: I've added the full suite of APGs on DF, so performance testing there should be more accurate.01:15
* StevenK stabs django for lying01:22
lifelessStevenK: oh?01:25
StevenKlifeless: Figured it out. The docs could be clearer about lots of things.01:28
* lifeless is no wiser01:29
StevenKlifeless: Adding commands that manage.py can execute01:30
wgrantOh01:42
wgrantEXPLAIN ANALYZE gets a bit confused when dealing with UNIONed subqueries01:42
wgrant           ->  Index Scan using teamparticipation_team_key on public.teamparticipation  (cost=0.00..30.16 rows=8 width=8) (actual time=0.016..0.173 rows=56 loops=5)01:43
wgrant                 Output: public.teamparticipation.id, public.teamparticipation.team, public.teamparticipation.person01:43
wgrant                 Index Cond: (public.teamparticipation.team = (2794))01:43
wgrantWhat it actually means is "Index Cond: (public.teamparticipation.team = [result of UNIONed subquery that happens to start with a literal 2794])" :(01:43
StevenKHah, helpfl01:43
StevenK*helpful01:43
lifelesswgrant: really ?01:45
lifelesswgrant: can I see the full explain analyze + original query ?01:45
wgrantlifeless: https://pastebin.canonical.com/71501/01:47
wgrantObserve the last couple of lines of the plan01:47
wgrantAnd how they make no sense unless it actually means the full UNIONed result01:48
wgrantNote also that the output of the HashAgg is '(2794)' because of that01:50
wgrant(ignore the Hash Semi Join... I'm trying to work out what it's doing there)01:52
lifelessWhat happens if you replace the select constant as grantee01:55
lifelesswith select grantee from (select constant as grantee)01:55
lifelessI wonder if its misplanning entirely01:55
lifeless-> worried01:55
wgrantNah, it just optimises that away01:56
wgrantThe plan seems correct apart from the hash semi join.02:02
wgrantWhich duplicates the other subplan, which is largely identical and more efficient02:02
wgrantI don't understand why it thinks it also needs the hash semi join02:02
lifeless11294 Time Outs02:09
lifeless6415 /    0  Branch:EntryResource:getMergeProposals02:09
lifeless^ regression methinks02:09
wgrantlifeless: That's the bug you triaged a week ago02:09
lifelessah'02:09
wgrant(and yes)02:09
lifelessi'm getting old in my young age.02:09
spmyou have a beard. bearded people are old. qed.02:12
spma 9yo expert in old people told me that.02:12
wgrantspm: He forgot that already02:12
wgrantDue to his age.02:12
spmclearly02:12
StevenKspm: '9yo expert' is a tautology02:13
spmnot from the 9yo's perspective.02:13
spm^^ relativity02:13
lifelessthats special02:13
wgrantStevenK: So, mind if I take over the structsubs branch?02:13
StevenKwgrant: ... to do what?02:13
wgrantStevenK: Make it fast.02:14
wgrantStevenK: I mean the private structsubs branch02:14
StevenKwgrant: If you like02:14
wgrantNot the information type one02:14
StevenKThe model code has landed already.02:14
StevenKThe UI will happen tomorrow now that get_bug_tags() no longer exists02:15
wgrantRight02:15
StevenKI'm still trying to bend django to my will02:15
StevenKIt acts utterly and completly stuffed with :memory: sqlite02:16
lifelessStevenK: :(02:22
lifelessStevenK: it possibly is dropping all the handles to it02:22
lifelessStevenK: if thats the case, use a random /tmp path for the db02:22
StevenKlifeless: Yeah, I'm getting to that point02:28
StevenKlifeless: I thought it was a process thing last Monday -- as in, if I could do syncdb and runserver in one process, it should be fine. It isn't.02:35
lifelessStevenK: sorry for making your life hard02:35
lifelessStevenK: /tmp will be the go02:35
StevenKlifeless: Yeah, I have two choices there. Hard code /tmp/auditor.sql in auditor's config, or forcibly import auditor's settings in the fixture and mktemp02:37
lifelessStevenK: you don't want a hard coded path :)02:38
lifelessStevenK: If I can make a (little awkward but tolerable I think) suggestion.02:38
StevenKYes I do, it will be EASY02:38
StevenKAs opposed to that last thing you suggested02:38
lifelessit will fail horribly when you have concurrency.02:39
lifelessso, in your settings.py, consult an environment variable for the path02:39
lifelessif its not set, use whatever path you were using before the :memory: experinment.02:39
lifelessin the fixture, set a unique path using TemporaryDirectory to get a throwawy subtree.02:39
lifelessand export it via EnvironmentVariable02:40
lifeless(both are fixtures from fixtures)02:40
StevenKThe fixture already creates a temp directory for the logfile, so that should be easy02:41
lifelesscool02:41
StevenKlifeless: http://pastebin.ubuntu.com/1131833/02:48
lifelesscool02:50
StevenKNow to hack the fixture02:50
wgrantThere'd better not be a default of a well-known path in /tmp, or I will be unhappy :)02:51
StevenKwgrant: BLEH02:52
StevenKBecause debugging via connecting to the DB is for chumps or something.02:52
lifelesswgrant: there will be, but the fixture will override it02:53
lifelesswgrant: and prod deploys will use postgresql.02:53
lifelesswgrant: so suck it up white boy :)02:54
wgrantlifeless: The fact that /tmp exposes a "create item by name" interface is a historical mistake.02:54
wgrantSo a path of /tmp/auditor.sql doesn't make sense02:55
wgrantAs it's not possible by sensible means to create a file with that path02:55
StevenKwgrant: So I'm supposed to make use of tempfile.mkstemp and just guess?02:57
wgrantGuess?02:57
StevenKEven though the fixture is going to override it and it's just for people wanting to run auditor's tests locally?02:57
wgrantIs any callsite not going to override the default?02:58
wgrantThe test suite surely has to02:58
wgrantIf nothing uses the default, then the default doesn't need to be there.02:58
StevenKThere are three testsuites here -- auditor's, auditorfixture's and LP's.02:59
StevenKThe fixture will override the default, so it's fine for the fixture itself and LP.02:59
lifelessthe risk is that someone will attack your system by having a symlink to something you care about at that path02:59
lifelessbut they can't generate arbitrary contents02:59
wgrantIt's not a significant risk here.02:59
wgrantBut it's something that people will copy.03:00
wgrantAnd it provides no value here03:00
lifelessso put big warning messages around it.03:00
wgrant=> it should not exist03:00
lifelesswgrant: whats your alternative ?03:00
lifelesswgrant: whenever you find yourself saying 'has no value' please provide an alternative, as an existence proof, for something functionally equivalent.03:00
StevenKwgrant: It provides value for people being able to run auditor's test suite03:00
lifelesswgrant: and yes, I realise the irony that I didn't do that for ORM discussion.03:01
lifelesswgrant: I should have.03:01
StevenKWithout having to set environment variable03:01
wgrantlifeless: Well, in order to use the default, I'd have to copy auditor.sql to /tmp/auditor.sql before running auditor. It's surely just as easy to set AUDITOR_SQL before running auditor.03:01
wgrantStevenK: Can't the test suite poke it in other ways?03:01
lifelesswgrant: huh?!03:01
wgrantHaving the test suite use a single well-known commonly-conflicted path is not a good idea.03:01
StevenKwgrant: Like I said before, which test suite?03:01
lifelesswgrant: tell you what, to get StevenK moving along.03:01
StevenKThere are three.03:01
wgrantStevenK: The one that would use /tmp/auditor.sql03:02
wgrantAny test suite using that is non-concurrent03:02
lifelesswgrant: understand we're *improving* the situation, it *used* to be just /tmp/auditor.sql always.03:02
lifelesswgrant: so file a bug, and StevenK can look at it later.03:02
StevenKActually, it used to be /home/steven/auditor.sql ... :-(03:02
lifelessStevenK: hah, same issue though.03:02
StevenKRight03:03
wgrantAh, if it's already worse, then OK :)03:07
StevenKAlthough, thinking about it, the testsuite doesn't use that, so the default can probably die03:11
lifelessStevenK: one step at a time03:12
lifelessStevenK: you may be right, but why yak shave when you don't need to.03:12
StevenKwgrant: Are you winning at making private structsubs fast?04:55
wgrantStevenK: Yes.05:14
wgrantTrying to also win at not making the queries horrid05:15
adeuringgood morning07:53
=== almaisan-away is now known as al-maisan
=== al-maisan is now known as almaisan-away
rick_h_jcsackett: ping when you get in, quick ? for you11:27
=== matsubara is now known as matsubara-lunch
jcsackettrick_h_: ping.13:56
rick_h_jcsackett: pong13:57
deryckadeuring, here's my branch, if you don't mind:  https://code.launchpad.net/~deryck/launchpad/support-pape-max-auth-age/+merge/11778113:57
rick_h_jcsackett: nvm about earilier, don't think it'll work13:57
adeuringderyck: ok13:58
jcsackettrick_h_: ok.13:58
jcsackettrick_h_: hangout still planned for now?14:03
rick_h_jcsackett: yea, just hangouts not playing nice and starting up for me atm14:03
rick_h_5th try to get it to load/start14:03
deryckrick_h_, are we using our url, or you starting a random one?14:04
rick_h_deryck: I'll try our url next I think14:04
rick_h_was trying to start a new one with no success14:04
deryckworked for me.14:04
=== matsubara-lunch is now known as matsubara
adeuringderyck: r=me14:21
rick_h_jcsackett: so I'm going to go think for a bit around lunch. Do you want to get together for a call this afternoon and kind of run through some points?15:09
jcsackettrick_h_: sounds like a plan. have a particular time in mind?15:10
rick_h_jcsackett: shoot for 3:00?15:10
jcsackettsounds good.15:11
rick_h_cool, thanks15:11
deryckadeuring, thanks for the review15:21
jcsackettsinzui: ping.15:53
sinzuihello15:53
jcsackettsinzui: free to chat a bit?15:53
sinzuiyes15:53
jcsackettfantastic.15:53
jcsackettsinzui: hangout invite sent.15:54
=== deryck is now known as deryck[lunch]
=== deryck[lunch] is now known as deryck
rick_h_jcsackett: up for hangout?18:56
rick_h_deryck: will want to put you on deck perhaps after this one as I try to get stuff talked over pre-EOD (heads up)18:56
jcsackettrick_h_: i'm free.18:56
rick_h_jcsackett: awesome18:57
deryckrick_h_, sure.18:57
deryckrick_h_, I'm done in an hour, since I started early and am at the beach.  Just to give you a heads up too ;)18:57
rick_h_deryck: ok, will try to go quick18:57
jcsackettrick_h_: we can keep ours short so you can talk to deryck.18:57
jcsackettrick_h_: can you send me the hangout invite? there are two of you in my G+ list and i'm not sure which to send the invite too. :P18:59
lifelessderyck: o/19:02
nigelbmwhudson: welcome back, post-new family member arrival :)19:20
mwhudsonnigelb: thanks!19:21
lifelessmwhudson: wb19:23
lifelessmwhudson: everything go smoothly ?19:23
mwhudsonlifeless: ended up with a c-section due to baby getting stuck on the way out, but aside from that everything is good19:24
lifelessmwhudson: woo (we did too)19:24
mwhudsonah right19:27
mwhudsonit's a pretty intense 45 mins or so between them saying "we need to do a caesar" and getting it done :)19:27
mwhudsonespecially if everyone's been awake for 24 hours by that point19:27
lifelessmwhudson: I have /no idea/ how long it took19:28
lifelesstis all a blur19:28
lifelessI remember the operating room vividly19:28
mwhudsonheh yeah19:28
mwhudsoni remember being taken away and forcefully fed some carbs19:28
lifelessbefore, after or during ?19:28
mwhudsonbefore the op19:29
lifelessinteresting19:29
lifelessthey didn't do that for me19:29
lifelessperhaps my weight dissuaded them :P19:29
rick_h_deryck: still got 10min?19:31
deryckrick_h_ sure19:31
rick_h_deryck: cool, normal hangout url?19:31
lifelessderyck: want to pick a time for a call?19:32
derycklifeless, yeah.  let's do my Thursday afternoon, your Friday morning.  if that works for you.19:33
lifelessits clear19:33
lifelesssinzui: did my logic make sense w.r.t. mutually invisible teams in a project?19:58
sinzuilifeless: yes20:04
sinzuiI asked Cody if they really use mutually invisible teams in a project?20:04
lifelessmaxb: *headdesk* ** 10020:20
maxbindeed :-/20:25
StevenKwgrant: http://pastebin.ubuntu.com/1133382/ is the traceback22:59
wgrantStevenK: Something under related_projects is throwing an AttributeError, probably.23:11
wgrantYou may want to call it manually23:12
wgrantin a test or harness23:12
wgrantAnd see what the actual error s23:12
wgrantis23:12
StevenKwgrant: Sorted it out. Did you want to review the MP I just put up?23:35
wgrantStevenK: Am doing so23:36
wgrantStevenK: Just a few things that need fixing.23:48
StevenKwgrant: Thanks. I've never quite figured out how IStoreSelector maps to I{,Master,Slave}Store23:51
wgrantStevenK: DEFAULT_FLAVOR == IStore23:52
wgrantMASTER_FLAVOR = IMasterStore23:52
wgrantSLAVE_FLAVOR = ISlaveStore23:52
wgrantWebapp code should very very very very very rarely use anything other than IStore23:52
lifelesscjwatson: nominations seem like overkill to me23:54
lifelesscjwatson: we had to cripple *who* could nominate because folk just nominated everything.23:55
cjwatsonI'm aware of that23:55
lifelessgood good23:55
cjwatsonNevertheless our defect analysts etc. need to be able to target bugs, but we don't want them to have full driver privs23:56
cjwatsonnote target not nominate23:56
lifelessso target is a superset of nominate.23:56
cjwatsonI know23:56
cjwatsonBugNomination.canApprove => target23:56
wgrantcjwatson: What undesirable privilege does being a series driver convey?23:57
lifelessI am confused; perhaps you can describe the things you /don't/ want the defect analysts to do, and how often they do them today.23:57

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