IRC log for #storm on 20120330

00:00.19*** join/#storm _mup_ (~mup@li37-90.members.linode.com)
04:02.49*** join/#storm stub (~stub@canonical/launchpad/stub)
07:57.34*** join/#storm jkakar (~jkakar@S0106602ad06e3f4b.vc.shawcable.net)
08:01.38*** join/#storm esteve (~quassel@cli-5b7eed72.bcn.adamo.es)
08:22.48_mup_storm/postgres-repeatable-read r443 committed by thomas@canonical.com
08:22.48_mup_Remove the dynamic setting, and use REPEATABLE READ everywhere
08:28.54_mup_storm/postgres-repeatable-read r444 committed by thomas@canonical.com
08:28.54_mup_Add NEWS statement
09:09.03ant384Hello. I've used CherryPy a bit, in a pretty standard setup. I'd like now to explore xmlrpc, and I'm trying to find some documentation that takes me from zero to usable xmlrpc code, prefferably with examples. Any tips ?
09:11.52ant384Wrong window, sorry.
14:13.55_mup_storm/trunk r442 committed by thomas@canonical.com
14:13.55_mup_Merge postgres-repeatable-read [r=jkakar,stub] [f=968298]
14:13.55_mup_Switch to REPEATABLE READ as default isolation level for Postgres, as it's the
14:13.55_mup_same for Postgres < 9 as SERIALIZABLE, and provides something saner on Postgres
14:13.56_mup_9. psycopg2 >= 2.4 needs to be used to see the change.
15:35.43webm0nk3yhello storm hackers, I am getting "out of memory for query result" when doing something like [r for r in store.find(...).order_by(...)] ... AIUI it shold be opening a cursor in PG and reading from it. so why would i get that error?
15:48.35jkakarwebm0nk3y: I noticed a couple of days ago that Storm (or psycopg2, not sure which one) is loaded large result sets into memory.
15:48.53jkakarwebm0nk3y: I haven't had time to debug it fully, to really understand where the issue is, so no bug has been filed.
15:49.13jkakarwebm0nk3y: It's definitely a bug somewhere.  Storm *should* be using fetchmany to pull batches of rows as you iterate like that.
15:51.35webm0nk3yjkakar: right
15:51.52webm0nk3yjkakar: or at least a cursor doing one row at a time
15:51.54jkakarwebm0nk3y: Are you on Precise?
15:52.10webm0nk3yjkakar: the code in question is lucid
15:52.19jkakarwebm0nk3y: Ah, interesting.
15:52.44webm0nk3yjkakar: should be easy to track down though
15:53.24jkakarwebm0nk3y: A good place to start (with pdb or something) is in storm.database:Result.__iter__.
15:53.36webm0nk3yjkakar: thanks
15:54.15jkakarnp
15:54.56webm0nk3yjkakar: do you think it's relevant which version (precise or lucid) we're running is?
15:55.05webm0nk3yjkakar: maybe the psycopg version?
15:59.08jkakarwebm0nk3y: I was wondering if it was a Precise-only thing, but since you're seeing the same behaviour on Lucid I guess it isn't.
15:59.27jkakarwebm0nk3y: I have a feeling it might be related to psycopg2.  We're just calling psycopg2.fetchmany without arguments, which should (I think), return data in batches...
15:59.35jkakarwebm0nk3y: But perhaps we need to be passing a count value?
15:59.42webm0nk3yk
16:02.08webm0nk3yjkakar: according to the documentation:  If it is not given, the cursor’s arraysize determines the number of rows fetched
16:02.38jkakarwebm0nk3y: Yeah, so that why I suspect there may be a bug in psycopg2...?
16:05.42webm0nk3y<PROTECTED>
16:05.42webm0nk3y<PROTECTED>
16:06.02jkakarwebm0nk3y: Yeah, and then _check_disconnect just calls fetchmany without arguments.
16:06.17jkakarwebm0nk3y: So I'd expect psycopg2 to do the right thing wrt to deciding how many rows to fetch.
16:06.28magmattwebm0nk3y: you could print out the query storm is running (by turning on the tracer), then execute the same query directly with psycopg2
16:06.40magmattthat would rule out or indicate psycopg2 as the problem, no?
16:07.02webm0nk3yi don't think seeing the query will help
16:07.15webm0nk3yit's how the underlying code is fetching the results
16:07.16magmattI mean running the query
16:07.21magmattoh, okay
16:10.13webm0nk3yjkakar: in storm.database, why is that fetchmany not a function call?
16:10.38jkakarwebm0nk3y: It get's passed to a _check_disconnect function which handles disconnection logic... it's called there.
16:10.47webm0nk3yahh ok
16:11.00jkakarwebm0nk3y: See the same file, line 364 or so.
16:11.04webm0nk3yk
16:12.54webm0nk3yjkakar: ahh and we set it to 10
16:13.00webm0nk3yarraysize i mean
16:14.28jkakarwebm0nk3y: Ah, I'd not noticed that... so it still points to psycopg2 ignoring that value, I think.
16:15.19webm0nk3yjkakar: that error is from psycopg2 right, i mean it's not a postgres error is it? I wondered if having the sort may have caused it
16:15.39jkakarwebm0nk3y: I guess you can tell from the traceback where it came from...?
16:16.05magmattwebm0nk3y: so... wouldn't executing the same query without storm as a layer tell you whether psycopg2 is the problem or not?  I think it will
16:16.27jkakarmagmatt: I think it would too.
16:16.35webm0nk3yhttps://gist.github.com/2252562
16:17.01webm0nk3ymagmatt: if i could run that against production perhaps, but i cant
16:18.01webm0nk3yhmmm...get_select
16:18.02jkakarwebm0nk3y: Hmm.  That looks like a psycopg2 exception that we're doing magic to wrap in a storm.exceptions.ProgrammingError.
16:18.41magmattoh, dang... let me see if I can duplicate it.  So it's suspected to happen by calling fetchmany on a large result set?
16:19.51webm0nk3yjkakar: but that's not erroring at fetchmany... it's at get_select(..) isn't it?
16:21.04webm0nk3yoh wait im just reading the traceback wrong
16:22.18jkakarwebm0nk3y: It looks like that traceback is truncated somehow.
16:22.30jkakarwebm0nk3y: I mean, I don't get how that error could come out of that final line.
16:23.41webm0nk3yi'll dig further when i get home...working from a coffeeshop this morning
16:33.36jkakarwebm0nk3y: Cool, thanks.
17:55.31*** join/#storm _mup_ (~mup@li37-90.members.linode.com)
18:12.40*** join/#storm zztw (~travis@router300.sf.archive.org)
18:16.05*** part/#storm zztw (~travis@router300.sf.archive.org)
18:37.14*** join/#storm Peaceful (~Peaceful@63-235-131-194.dia.static.qwest.net)
18:37.46PeacefulIs there a way to introspect an Enum property to see what the valid values are?
18:38.34PeacefulFor example, lets say class Pet has a property: kind = Enum(map={u'dog':u'dog', u'cat':u'cat'})
18:38.42PeacefulI want to get the list 'dog', 'cat'
18:38.58Peacefulwell, ['dog', 'cat']
18:51.15*** join/#storm niemeyer (~niemeyer@177.18.138.61)
18:51.15*** mode/#storm [+o niemeyer] by ChanServ
21:24.22*** join/#storm kr4d10 (~kr4d10@2001:49f0:a01d::203)
21:28.52*** join/#storm kr4d10 (~kr4d10@2001:49f0:a01d::203)
21:29.09*** join/#storm kr4d10 (~kr4d10@2001:49f0:a01d::203)
21:36.09*** join/#storm kr4d10 (~kr4d10@2001:49f0:a01d::203)
21:38.38*** join/#storm kr4d10 (~kr4d10@2001:49f0:a01d::203)
21:38.56*** join/#storm kr4d10 (~kr4d10@2001:49f0:a01d::203)
22:29.40*** join/#storm magmatt (~Matt@63-235-131-194.dia.static.qwest.net)
23:24.51*** join/#storm fcorrea (~fcorrea@189.121.216.174)

Generated by irclog2html.pl Modified by Tim Riker to work with infobot.