but the note here "The “threadlocal” feature is generally discouraged. It’s designed for a particular pattern of usage which is generally considered as a legacy pattern." makes me think twice
the other thing is that there is only one case where this is a problem currently, and they're both SELECTs, so there's no issues with transactions
ruaok
it is exactly this type of stuff that makes me dislike ORMs and SQLalchemy in particular.
alastairp
ruaok: we're not using ORMs
ruaok
s/ORM/overly clever db abstractions/g
alastairp
theis issue was also present when we were using psycopg2
Gentlecat
and it wasn't better before
right
alastairp
we just put our heads in the sand and hoped it wouldn't be a problem
I'm trying to fix that
s/ORMs/webapps/
ruaok
this feels like shoveling it to the a different part of the sandbox and sticking your head into a different part of the sandbox.
RJ2 joined the channel
and yes, in this case transactions don't come into the game, unless you need 100% garanteed data consistency between these two calls.
in which case you would use a transaction in order to use the isolation feature.
alastairp
right. I think this is what I'm getting to
D4RK-PH0ENiX has quit
where we don't need a transaction for this specific case, so we shouldn't try and make a generic solution for a problem we don't have
ruaok
yes, but you will likely run into a problem in the future, so having a plan for it is good.
Gentlecat
alastairp: maybe another way to think about that is that each interface/function in the db package should be isolated
alastairp
that doesn't make sense for duplication of code, though
we will end up having "get lowlevel data" written 4 times in the module so that we can keep code within a function
(this is the problem that I've been trying to fix, it was already duplicated twice)
Gentlecat
why would we have it 4 times?
alastairp
well, we already had it twice
get_low_level, and get_summary - which loaded lowlevel and highlevel
I could see there being another case where we had to get lowlevel data to compare it to something else
hmm
I'm looking at what I did with messybrainz - I pass a connection to all database methods
which helps make it explicit. I think I just did it at that time to make it work as quickly as possible
ah, ruaok was smart in the HL extractor, all the database work is done on the mainthread
ruaok
smart? don't confuse laziness for intelligence.
alastairp
perfect. I'll keep believing you're smart
ruaok
keep?
alastairp
<- optimist
larsen has quit
larsen joined the channel
LordSputnik joined the channel
samphippen joined the channel
LordSputnik has quit
legoktm
good morning o/
LordSputnik joined the channel
ruaok: I did most of the easy mysql schema changes last night, when I tried to do the larger ones with pt-online-schema-change, it complained the mediawiki mysql user didn't have the PROCESS right. Is it alright if I create a new mysql user specifically for pt-osc with that right?
(and whatever other rights are needed)
ruaok
sure.
that VM is your domain, feel free to do things as you need to.
alastairp
OK. We have a mid-term solution that we'll go for
but I'd still like to talk to someone who actually knows what they're doing
ruaok bets luks does
for now we're going to open explicit transactions in the methods we know require them (write lowleve, write highlevel, some dataset methods)
D4RK-PH0ENiX joined the channel
D4RK-PH0ENiX has quit
diana_olhovik_ has quit
D4RK-PH0ENiX joined the channel
D4RK-PH0ENiX has quit
D4RK-PH0ENiX joined the channel
ruaok
are you a fan of Kraftwerk? Love "Autobahn"? If so, this is a must for you:
07:23 < ruaok> it is exactly this type of stuff that makes me dislike ORMs and SQLalchemy in particular.
if you are a small team, the overhead of ORM is sometimes worse than what it cures
if you are a larger team, you really don't want devs wrting SQL
ruaok
darwin: makes sense to me.
Leftmost: ping
LordSputnik: ping
LordSputnik
ruaok: pong
ruaok
I'm trying to order stickers for all of the projects.
what do I do about the BB stickers?
LordSputnik
Keep brown
ruaok
ok
3"x3" stickers. Die cut (in the hexagon shape). Of MB, AB, LB, picard, CB, MeB and BB. yes, no?
LordSputnik
Do they do custom T-shirts as well as stickers?
ruaok
don't think so.
bitmap: are you around?
ruaok has quit
yeeeargh joined the channel
JesseW joined the channel
ruaok joined the channel
JesseW has quit
alastairp
ruaok: we can move lowlevel to metadata/json tables too!
ruaok
clean up lots of sins. :)
alastairp
darwin: I'm a co-maintainer on an ORM-based app written by people who don't understand relational databases
it shows
I'm really glad that I started development with sql, then started with ORMs
I'm finally starting to learn the middleground
darwin
alastairp: haha, that sounds... fun.
alastairp
darwin: newrelic free trial + some indexes -> postgres cpu usage from 90% to 15%
reosarevok joined the channel
reosarevok has quit
reosarevok joined the channel
drsaunders
fyi i think there may be a server issue atm
ruaok
thanks will look.
zas: you around?
here is your first chance to save the day! :)
uh oh.
corosync on ernie ia 100% cpu load.
bitmap
ruaok: I'm here now
ruaok
yeah, I was wondering about sending stickers to you and have you bring them, but you leave too soon.
I'll have to pester Leftmost
bitmap
ah, right
zas: it looks like you're already an owner for the metbrainz org, and the 'musicbrainz' account password is in syswiki, not sure there's anything else I can do
I don't see a way to make someone admin of a repo, if that exists