« first day (449 days earlier)      last day (4402 days later) » 

2:34 AM
Well I think it will have to be some kind of official event to get T & E :-)
 
 
4 hours later…
7:03 AM
@Concerned It's funny how you assume that we know what ^h means. You're right, but it's funny. :)
 
^H is definitely old school
But I giggle a little every time
@ConcernedOfTunbridgeWells I am probably available Sunday or Monday. We are in West London (staying at the Novotel).
 
@AaronBertrand This coming week?
 
Somewhere near Leeds, which I guess is at the edge of Zone 2? I've been to London a few times but don't know the layout.
Yes, I fly over Thursday morning, have Bits to attend Friday/Saturday.
 
@AaronBertrand Leeds is a whole other city.
What's the postcode of the hotel?
 
I was just repeating what I was told
They might have said Reed's
I think it was the name of a company, not a city
Post code is W6 8DR
 
7:09 AM
@AaronBertrand That's west London.
 
That's what I thought
 
@AaronBertrand You're in Hammersmith with that post code.
 
I fly into Gatwick Friday morning. Fly out of Heathrow Tuesday.
 
gbn
I'd be over but have to be in Switzerland from tomorrow
for last time hurrah
 
@AaronBertrand I live fairly close to Heathrow. My other half works near there.
What time do you finish up on Saturday?
 
7:12 AM
I think I'll be fairly occupied for the evening
We're sponsoring a pub night, I can probably procure a ticket for you if you wanted to attend
I'll have to get details though, I'm only partially aware.
 
@AaronBertrand OK. I'll have to come back down to Bournemouth on Monday (I'm working down here), so Sunday it is.
 
I was only recently coerced into going over there at all. After all, I just flew to Las Vegas from Dublin yesterday. :-)
 
@AaronBertrand That could be a goer. @MarkStoreySmith, @JackDouglas and @MartinSmith all live around London.
 
Is anyone attending any portion of Bits?
 
@AaronBertrand I'm not. Not sure about anyone else.
 
gbn
7:13 AM
Love to but can't
@MarkStoreySmith is I think
 
Sorry @gbn, maybe Malta :-)
 
@AaronBertrand How convincingly do we need to fake it?
 
gbn
@AaronBertrand Let me know what checkboxes need ticked
pens? Mugs?
 
In a previous existence I used to be a typesetter. We could make up some fake programmes and lecture handouts as well.
'Business Intelligence in the London Insurance Market'
 
gbn
@AaronBertrand my impression was the other merkins would pop in while on vacation over here. That's how they'd sell it to their other halves
 
7:17 AM
@AaronBertrand I do like the idea of faking a whole conference, though.
 
gbn
I can fetch some locals
BI + SQL types
 
@AaronBertrand How many do you think you would need?
Can't imagine it getting anywhere near that big. Probably about 1/10 of that.
@AaronBertrand That's probably Mk. 2 - a Malta SQL conference might be quite a gas.
Malta actually have a government policy to expand their I.T. industry, so there's a bigger industry there than might be expected.
So, @gbn's idea of setting up a SQLPass chapter isn't wholly silly.
@AaronBertrand Pity, that. We'll just have to go drinking with you this weekend :)
 
I've gone on SQL Cruise at a similar or slightly lower cost, and that's an audience of 12-15, but that's a legitimate community event and we get a whole lot more exposure from the sponsorship than from my actual presence
 
gbn
Checking with a colleague
 
If you organize a legitimate SQLPass chapter, and make it an official SQL Saturday event, then there is a whole lot more opportunity for me to attend one of those.
 
gbn
7:24 AM
@AaronBertrand that's what I just checked
 
@AaronBertrand Maybe your outfit would be up for sponsoring a pukka SQL conference in Malta at some point.
 
What is pukka
 
gbn
There is precedence (not SQL though). Malta Uni can host, a company sponsors,
"Genuine"
 
Yes, I think so
The nice thing about the SQL Saturday circuit is that it's set up, approved etc. before there is any true indication of attendance
So if there ends up being 15 people, there's 15 people
 
@AaronBertrand I like the cut of your jib.
 
gbn
7:27 AM
my colleague suggests a dozen or 4 DB types would be in the market for this
 
If you get PASS buy-in and apply for a proper SQL Saturday, I will do my best to get sponsorship from my company.
 
@gbn Do you think we would have to put together some real seminars?
 
gbn
My company has links to malta uni too: one guy lectures there
@ConcernedOfTunbridgeWells the downside
So, in summary
 
@gbn I have done that sort of thing before.
 
gbn
1. make it official to blag Aaron over
 
7:28 AM
@AaronBertrand You'll need a mod to do that.
 
gbn
2. don't officialise it and no Aaron
 
I think anyone in this room could put together a one hour session that at least one other person would learn at least one thing from. We're not here because we're morons. :-)
 
@JackDouglas - could you help @AaronBertrand out here?
 
gbn
we could rustle up a few presentations between us
 
7:30 AM
I've got a couple that I've been giving quite a bit
 
@gbn Want to do one on the joys of MySQL vs. SQL Server?
 
gbn
@ConcernedOfTunbridgeWells he he I could
 
@gbn I could probably do one on B.I. in some form
 
gbn
there are local IT vendor companies too that may be interested
 
@gbn Do you think there would be many punters for some sort of 'intro to analysis services for SQL Server devs/dbas?'
 
gbn
7:33 AM
@ConcernedOfTunbridgeWells BI is quite big here
 
@gbn I got that impression. It's a big enough field that you might want to be a bit more specific than just 'B.I.', though.
 
@AaronBertrand Can you message me a mobile number or some contact details on Linkedin so I can get hold of you when you get to the UK?
@gbn Having never used Qlikview, tableau or Powerpivot, I'd say SSAS is probably the best topic that I can think of. It's one of those things that people usually hit at most once per project. Do some cubes then move on and don't touch anything for a year after that.
 
@AaronBertrand TBH I'd struggle with that one, unless you want a discourse on the finer elements of Sybase/SQL Server compatibility with extended character sets :D
(re the comment 20 minutes ago about anyone here being able to put a presentation together that everyone here would learn something from)
 
8:08 AM
@ConcernedOfTunbridgeWells I won't have a working phone over there, but I will be actively watching abertrand@sqlsentry.net
@SimonRigharts I think you may be selling yourself short
 
Morning chaps
 
@AaronBertrand A presentation that everyone here would learn something from is a pretty high bar to set
Morning Mark
 
I disagree but maybe we have a different perspective on "something"
In any case, I meant that anyone here could engage / teach something to the average attendee, not necessarily engage everyone here for an hour
 
Oh, that's a slightly different kettle of fish then :) (I agree with you then)
 
gbn
@MarkStoreySmith Howdo
 
8:29 AM
@MarkStoreySmith @AaronBertrand is free for drinkies on Sun or Mon, and may be able to wangle some invites for a BITS shindig on Saturday night.
@AaronBertrand I've sent you an email with some contact details.
 
hello
@ConcernedOfTunbridgeWells with deleting?
 
Mornin' Jack
 
Hi @Simon
 
Yo
 
ello
is everyone off to Malta then
or is that yesterday's idea :-)
 
8:43 AM
@JackDouglas Yes.
 
I don't think I have a tool to delete blocks of messages?
 
Would totally do a Maltese jaunt, except for the airfare cost :v
 
but anyone can delete their own (and we can delete anyone's, but you'd have to tell me which one's)
 
@JackDouglas There's probably a dozen or so that AB wouldn't want his employer to see :)
 
Also a complete lack of available holiday time, but that's a minor detail
 
8:45 AM
@JackDouglas I think you can only delete your own for about 2 minutes.
 
If you're referring to chat you can only delete your own for 2-5 minutes
 
ahhh
 
From about that one down.
 
I'm up for beer
I mean Malta
:)
 
I might be up for beer but not Malta :-/
 
8:46 AM
@Phil There might be more drinkies in the works on Sun-Mon as well. @AaronBertrand is down for BITS this weekend and free on Monday.
 
unfortunately
 
@JackDouglas Pity about that.
 
@ConcernedOfTunbridgeWells can you email me links? I've no idea which ones
 
@JackDouglas Not sure I've got your email address.
 
got it?
 
8:51 AM
Got it
Just sent it to @AaronBertrand as well in case he needs anything else redacted.
@JackDouglas - @AaronBertrand is staying in Hammersmith. Apparently there's a BITS shindig on Saturday that he thinks he can get some people into, or maybe we could do something on Sunday. I'm back down to Bournemouth on Monday so that's not really a goer for me.
@JackDouglas You should have a list of stuff I picked up on an initial pass.
 
@ConcernedOfTunbridgeWells ta :-)
 
@JackDouglas If we do something around Richmond, @AaronBertrand can get a taxi back and we could train back out.
@MarkStoreySmith - want to attempt something around Richmond on Sunday?
 
9:27 AM
@ConcernedOfTunbridgeWells I'm up North for the day on Sunday but arrive back to Kings Cross 8.15 so can head straight over
 
@MarkStoreySmith OK. I think Richmond is a good location - @AaronBertrand's staying in Hammersmith and could taxi back to his hotel easily. You and I could train home from there, and I think @JackDouglas could get to Ealing or somewhere that he could train home from. Plus, plenty of eateries and watering holes in Richmond. Does that make sense to every one or does someone have a better idea?
 
@ConcernedOfTunbridgeWells Sounds like a plan
 
I would've been in Kingston for an 8 mile run on Sunday, but my mate has wussed out
 
@JackDouglas - does that work for you?
@Phil Want to come down to Richmond - I've got a fold-out bed you could crash on for the night.
(not in Richmond, but trainable from there)
 
Times like this make me wish I'd gone for London instead of Wellington :v
Then I remember what London's actually like and shudder a bit.
 
10:01 AM
@ConcernedOfTunbridgeWells will check with family, diary etc, but sounds good in principle :-)
 
10:21 AM
Ta for the offer. Already arranged other antics though
 
10:40 AM
@JackDouglas OK. I'll try to arrange a venue for a meal around 7:30 and we can meet up there.@MarkStoreySmith probably won't be there until 9 or so, I imagine. Once he turns up we can hunt around.
 
11:25 AM
@ConcernedOfTunbridgeWells would it make more sense to meet at Hammersmith? That'd be quicker for Mark and would suit Aaron better (is Aaron coming?)
 
 
1 hour later…
12:48 PM
@JackDouglas Can you get a direct train from there?
Actually, maybe from Hammersmith it would be easier to split a taxi via Sunningdale to Maidenhead?
 
1:20 PM
@ConcernedOfTunbridgeWells I'll be driving and leaving at a sensible time ;-)
Be good to check with Aaron what Hammersmith is like - I've not been out there for a while, people may prefer somewhere like Richmond, dunno?
 
1:55 PM
@JackDouglas Richmond has lots of eateries and is taxi-able from Hammersmith quite easily. @MarkStoreySmith and I can train to there directly and You could get to a station like Ealing or some such on the Paddington line that goes out through Maidenhead.
@JackDouglas I wend to the Apollo there once, Not the most salubrious part of town, but maybe OK.
 
2:08 PM
I am not fussy and I don't think I'll know much about my immediate surroundings anyway. Taxi is fine but not too far! :-)
I won't know much about the area because (a) I won't be outside much Friday/Saturday and (b) I wouldn't know how to assess the place in any case.
 
@AaronBertrand Hammersmith to Richmond is a few km, so not terribly expensive in a taxi. I picked it because (a) I've been there a few times and it's got lots of pubs and eateries of one sort or another. Also, @MarkStoreySmith and I can get there directly by train and @JackDouglas could get to a fairly short taxi ride by train.
However, I think he plans to be a responsible driver and drive in.
I don't really know Hammersmith either, although it's not the most salubrious part of town. I thought Richmond might be better.
Currently I have in mind something involving eating at a restaurant around 7:30 or 8 and then a few quiet drinkies at one of the local watering holes afterwards.
 
Sounds perfect
 
@MarkStoreySmith will probably get there a bit later, maybe in time to join us for drinks.
 
I'm missing out on all the fun
 
@AaronBertrand - If you want something to amuse yourself during the day on Sunday you could do the London Dungeon (right next to London Bridge Station - navigating on the trains left as an exercise to the reader) or maybe the Eye (the big ferris wheel thing next to Waterloo Station).
Truckloads of historic buildings if you're into that sort of thing.
You could also do the Borough Market (Also next to London Bridge Stn) in the morning for some expensive, but yummy food, or the Portobello Road market (a few blocks down from Paddington) if you like that sort of thing.
@Shark Want to pop across to London for a few drinks on Sunday night?
 
2:28 PM
@ConcernedOfTunbridgeWells I would, if only time and money were not an issue :)
 
@Shark Yes, economics always tend to put a spanner in the works for that sort of thing.
:)
 
@ConcernedOfTunbridgeWells I've always wanted to visit England, looks like a beautiful place
 
@Shark Bits of it still are, although much of London is fairly grotty.
 
@ConcernedOfTunbridgeWells I have this vision of England as flowing green hills of grass and beautiful castles
 
@Shark I think you're about 500 years out of date there.
 
2:30 PM
@ConcernedOfTunbridgeWells Are you close to the coast? I'm an Ocean guy
(hence the name/avatar)
 
@Shark Not really, quite a way inland.
Bournemouth is on the South coast. I'll be working here for a few months.
 
@ConcernedOfTunbridgeWells How's the cost of living there? Can a SQL Server DBA live pretty comfortably?
 
@JackDouglas - I don't know hammersmith at all is Richmond OK with you?
 
@ConcernedOfTunbridgeWells It's fine :-)
 
@Shark Buttock-clenchingly expensive, but you can pull quite good money as a contractor. Take a look at www.jobserve.co.uk and key in SQL Server DBA.
@JackDouglas I thought it was a reasonable compromise of accessibility, facilities and familiarity.
 
2:32 PM
@ConcernedOfTunbridgeWells Is it just expensive when you live IN the city? Couldn't you live right outside and do alright?
 
@Shark I live outside the M25 (big ring road) and there are still plenty of £1M+ houses here that are really nothing special.
The entire south east is pretty densely populated, so anything in the commuter belt is going to go for a premium.
 
@ConcernedOfTunbridgeWells That is unbelievably expensive
@ConcernedOfTunbridgeWells Any big IT cities near the coast for our type (DBA)?
 
@Shark Sunningdale is a fairly expensive place - plenty of Bentleys, porsches and Lamborghinis parked outside the cafe there.
@Shark Brighton is about 1 hour on the train from London and it's right on the coast.
You can commute directly to London Bridge Station from there and it's walking distance to anywhere in the square mile (financial district) from there.
 
@ConcernedOfTunbridgeWells Prices down there are pretty serious for the good areas
 
@ConcernedOfTunbridgeWells Is Brighton expensive too?
 
2:35 PM
@Shark Not cheap, but not in the same league as London.
If you can pull a contract job as a SQL Server DBA you should be able to bring in about £400-£500/day.
 
@ConcernedOfTunbridgeWells WHAT?! That's some serious money
 
@Shark You might have to work cheap for a gig or two but you should be able to pull your rate up into that range. Take a look a the contract jobs on www.jobserve.co.uk. Some of them have rates listed, which should give you some idea of what to expect.
The banks and hedge funds pay the most, but you have to put up with working with merchant bankers.
Outside London the rates will be lower.
 
@ConcernedOfTunbridgeWells Now are you talking about independent contracting/consulting?
 
@Shark Contract work. There's a big contract market in London. Not quite freelance consulting as it all tends to be brokered through agents.
 
@ConcernedOfTunbridgeWells And plenty of work with no fear of financial security?
 
2:41 PM
@Shark You sleep better at night with a healthy buffer in the bank. 6 months mortgage/bills would always be sensible if you're in the contract game.
I was able to get started thanks to a redundancy from a full-time job back in 2002
 
@MarkStoreySmith That makes sense. Is that what you do, Mark? Are you a contractor?
 
@Shark Yip
 
First page of results for jobs in London off Jobserve for 'SQL Server DBA' contract
340 p/d
350 p/d
300-350 p/d
500-600 p/d
320 p/d
400-450 p/d
350-450 p/d
 
@MarkStoreySmith Do you mostly do jobs in London?
 
@Shark Much of the work is in London.
 
2:42 PM
@ConcernedOfTunbridgeWells That's quite promising
 
@Shark If you're <32 years old you could do a two year working holiday.
 
@ConcernedOfTunbridgeWells I'm very much less than 32 years old :)
 
@ConcernedOfTunbridgeWells Good odds a backup/restore monkey would be a viable candidate for the 300pd jobs in that list
 
@MarkStoreySmith Probably. I didn't look at the descriptions, but I presume the lower paying ones are junior roles.
@Shark Take a look into the Working Holiday visa to dip your toes in the water.
You might have to take one or two crap gigs to start but once you get yourself established you should be able to pull real money.
 
@ConcernedOfTunbridgeWells I'll check it out
 
2:47 PM
@Shark For a single bloke, probably should budget about £1,500 a month for living costs anywhere around London.
 
@ConcernedOfTunbridgeWells That's not too bad at all
 
You might get away with less, but anything more than a hovel costs an arm and a leg to live in London. The standard of accommodation as a function of the living costs in London is pretty dire.
 
@ConcernedOfTunbridgeWells A hovel?
 
@Shark If you're pulling a contract rate it's quite manageable, but it would suck up a fair chunk of a permanent salary.
 
@ConcernedOfTunbridgeWells Are the salaried positions lacking?
 
2:49 PM
@Shark If you're used to the size of houses in the U.S. Places in London will feel like a shoebox.
 
@ConcernedOfTunbridgeWells :)
@ConcernedOfTunbridgeWells So what's Tunbridge Wells and why are you concerned?
 
@Shark Not particularly, but it would be nearly half the take home pay of a mid level I.T. professional on (say £50-60K p/a).
3
Q: "Concerned of Tunbridge Wells" - what is the etymology of the name?

ConcernedOfTunbridgeWellsWhat is the origin of "Concerned of Tunbridge Wells" - a possibly fictitious writer of letters to the editor? Can anyone dig out a definitive etymology for the term, or is it just a conflation of 'Disgusted of Tunbridge Wells'?

Contracting is very much the way to go if you have an in-demand skill.
 
@ConcernedOfTunbridgeWells Interesting read, thanks for the link
 
I used to live a few miles away from Tunbridge Wells.
 
@ConcernedOfTunbridgeWells Is it that bad?
 
2:54 PM
@Shark Tunbridge Wells is quite a way out of London - a conservative commuter belt town, mainly associated with retirees and stodgy conservative types.
Sort of a running joke.
 
@ConcernedOfTunbridgeWells :) I see
 
I also used to live just down the road from a village called 'Pratt's Bottom'
 
@ConcernedOfTunbridgeWells Haha
 
Just to prove it's real, Google Street View.
 
@ConcernedOfTunbridgeWells Wow so that's real close to London
 
3:00 PM
@Shark Pratt's Bottom?
 
@ConcernedOfTunbridgeWells Yeah
 
I used to live in Petts wood, which is about 25 mins from London Bridge on the train. Not too expensive by London standards. You could also look around Orpington, the next station out.
 
@ConcernedOfTunbridgeWells :)
 
Pratt's Bottom is just down the road.
Lewisham is a bit scungier, but cheap-ish and 15 mins on the train to London Bridge. You can also get to Canary Wharf on a light rail system called the DLR. Quite a few banks and suchlike have digs in Canary Wharf.
Most of East London's worth avoiding.
 
@ConcernedOfTunbridgeWells Loved my tube rides through Hounslow East and West last year. :O
 
3:06 PM
You could also live close into down, say Bermondsey or Southwark or somewhere around the West End, but that's pretty expensive.
@swasheck From Heathrow?
Known locally as 'eefrow'
 
@ConcernedOfTunbridgeWells Indeed. Was there for a total of two evenings and did all I could to stay away from the airport.
 
@swasheck The Picadilly line takes ages to get out to Heathrow. Better off taking the Heathrow Express or Heathrow Connect. The fares are a bit steep but it's quick and much more comfortable.
 
but I loved my time in London, brief though it was. Of course I had to be a tourist and hit the museum - and a great museum it is.
@ConcernedOfTunbridgeWells Yes, well, I discovered that later (on the return trip).
 
@COTW: So, lets say a guy is looking for a contract as a DBA in London. Any advice on how to get the first job (never worked in UK before)?
Besides adding "I've been in that great BI conference in Malta last September" :)
 
@swasheck There are truckloads of galleries and Museums in London - actually @AaronBertrand, the National Gallery or British Museum might be a way to kil some time in London.
@ypercube You probably have to physically turn up first, although you could make some appointments for by phone before you come.
Here's what I did.
 
3:12 PM
I have plenty to do Sunday during the day already. I've seen many of the sights on previous trips. Boss is running a half marathon, so need to heckle / throw stones.
 
I spent a bit of time phoning agents before I came, and jacked up some interviews. Just said when I'd be there and made the arrangements.
Then I just did all the interviews I could arrange for a few weeks. I got some so-so offers - at the time I was looking for perm work - but then got a contract job. I haven't looked back since.
I think I was a bit fussy (it was 2004 and the job market was pretty buoyant), so I turned down some that I probably shouldn't have.
The market's a bit tighter now, but I think there's still a skill shortage for DBAs.
 
@ConcernedOfTunbridgeWells Good news for us. Keep the DBA-supply low, so the demand is high. :)
 
At a guess I'd say do some telephoning for a couple of weeks before you come and just send out CVs to anything appropriate you find on Jobserve. Stay in a cheap hotel or B&B and just keep sending out CVs to stuff on Jobserve. Be prepared to take a crap job to start if necessary, but this isn't such a big deal on contract work.
It's mostly a chicken-and-egg problem. Get your first contract gig, and maybe don't be too fussy, and then it becomes easier after that.
Also, apparently SE careers works OK in London, so it might be another avenue.
Beyond that I don't think I have much else in the way of words of wisdom.
Anyway, my data won't monkey itself, so I'd better stop talking shite and actually do some of the work I'm being paid for.
 
Thnx. I like the chicken-and-egg comparison :)
 
3:45 PM
@ConcernedOfTunbridgeWells I've been meaning to remind you that your SE name can have spaces in it, but your name doesn't even fit in the box as it is.
 
@NickChammas I suppose I could change it to something shorter (SQL Simian maybe?)
LackOfBusinessIntelligence?
 
@ConcernedOfTunbridgeWells No. You should write a letter to the SE team complaining about how your name doesn't fit in the user box.
 
@NickChammas XD
Well played sir
 
or that spaces should be allowed in names
 
@ypercube I think they are.
 
4:04 PM
Yeah, look at my name.
Hold on.
I need to type a lot of stuff.
So that my full name shows up on the side.
There we go.
See?
 
Yes, my wrong.
 
@ypercube are there bits of your name we can't see because they are in a different dimension?
 
@JackDouglas LOL
 
@jcolebrand: is that from an actual BoB SP episode? Or a made-up?
 
4:15 PM
@ypercube it's a quickmeme. That means it's made up.
It's because I gave a dev this AM a line of code, and he's all questioning me on it. Like I don't know wtf I gave him or something.
 
"You missed an edge case, you don't understand the mechanisms involved, I've tried to explain that you have two considerations, and you don't want to follow along, or don't have the experience.
 
I like that the actual title ("We Should Push Bikini Bottom Some Where Else ") is kind of related to your issue, ("Just Push the Code")
 
@Phil grammar seems slightly better in the 2nd
Also, it is two different questions. First question is trying to link to Oracle, second seems to be trying to link from Oracle.
 
@Phil no
unless he is using a proxy ;-)
 
:D
 
5:12 PM
@NickChammas I wonder if there's an april fool's stir in that.
"Sir,
I am outraged at the lack of space in your style sheets for the display of user identity. .....
Yours,
ConcernedOfTunbridgeWells"
 
5:56 PM
@JackDouglas Yeah, the billing systems I've been involved with in the past have a configurable number of decimal places. I didn't want to confuse the OP
 
@ConcernedOfTunbridgeWells Meta post with signatures by everyone in here.
 
@NickChammas Something like that.
 
 
2 hours later…
7:53 PM
People of the world, I have opened a bounty on someone else's question.
8
Q: How do you test for race conditions in a database?

xenoterracideI try to write database code to make sure that it's not subject to race conditions, to make sure that I've locked the correct rows or tables. But I often wonder: Is my code correct? Is it possible to force any existing race conditions to manifest? I want to be sure that if they do happen in a pro...

 
what other kind of race condition may occur besides a deadlock?
 
assume READ COMMITTED
and the canonical bank transfer
wait, scratch that
Consider READ COMMITTED isolation level. I want to charge all accounts $1 if they have $100 or less in their balance.
Session 1
BEGIN TRANSACTION
check balance... balance = $50
Session 2
BEGIN TRANSACTION
balance = balance + $100
COMMIT TRANSACTION
Session 1
balance = balance - $1
COMMIT TRANSACTION
In session 1, you performed a supposedly atomic unit of work to charge the offending account $1. Instead of the account having $49 at commit time, though, it has $149.
In this case, that doesn't sound so terrible. This is a race condition though, and could cause serious problems, especially if Session 1 does more work based on the assumption that the balance it touched has less than $100.
The REPEATABLE READ or SERIALIZABLE isolation levels would fix this particular issue, by holding the shared locks on the balance until Session 1 commits its transaction.
 
8:15 PM
yep
isn't a race condition a crash or unexpected error?
 
nope
A race condition or race hazard is a flaw in an electronic system or process whereby the output or result of the process is unexpectedly and critically dependent on the sequence or timing of other events. The term originates with the idea of two signals racing each other to influence the output first. Race conditions can occur in electronics systems, especially logic circuits, and in computer software, especially multithreaded or distributed programs. Electronics A typical example of a race condition may occur in a system of logic gates, where inputs vary. If a particular output depend...
 
wikipedia says unexpected output is a race condition
heh beat me to it
 
"...whereby the output or result of the process is unexpectedly and critically dependent on the sequence or timing of other events."
That's the essence of a race condition.
 
I can't think of any way to test those situations
 
No bounty for you then. :)
 
8:18 PM
heh true
but I'd say you have to make use of the appropriate isolation level in those cases
because you can't assume those kind of things won't happen if the isolation level permits it
you can also use snapshot isolation in that case, so that readers won't block writers and vice-versa
 
Sure. But how do you know you're using the right isolation levels? Rather, once you've thought about it and chosen the "right" isolation levels, how do you test to make sure they are indeed correct?
 
unit testing?
if anyone knows how to create unit tests automatically, they're sitting on a pile of money heh
 
Testing for race conditions feels like a higher-order type of testing. Holistic testing, load testing, and concurrency testing are more appropriate for this kind of problem than unit testing.
Of course, if you can capture a concurrency test into a unit test, then yeah you've got something cool.
 
I'm thinking of having some kind of client tool
which does a sleep for x seconds after each statement
and having another client tool updating every row of the destination table
and the first client tool checking if the expected output is returned
does that make any sense?
 
Yeah, but you need that baked into the code that is doing the work, not a separate tool.
Otherwise you aren't testing your database code, just your client tool.
@jcolebrand @JackDouglas - RE: dba.stackexchange.com/q/12401/2660 I'd check with Joel to make sure he didn't ask for that question to be migrated here himself.
 
8:30 PM
not really, it would be testing if the code would fail if it took longer, increasing exposure to race conditions
 
@Gonsalu Statement as in SQL statement or atomic unit of work (like a proc call)?
 
SQL statements
but it's a pretty simple idea, someone probably has a better solution for testing this kind of situations
 
9:13 PM
@NickChammas Formally proving concurrent processes can be done with a model called 'communicating sequential processes'. There is a free automated CSP proving tool, although I can't remember the name.
However, you have to implement your model in the tool, and the complexity of formal proofs rises exponentially with the complexity of the system, so formal methods of this sort tend to only be applicable in relatively simple control systems.
Automatically testing all the edge cases in concurrency of even a moderately complex business application is likely to be computationally infeasible.
So, I'll say 'this is a pipe dream' and collect my bounty. Kthxbye ;)
However, as a consolation prize, the sort of situations the OP is worried about are fairly rare, and can usually be handled by using a fairly conservative isolation level on transactions.
 
9:43 PM
@ConcernedOfTunbridgeWells Right. We are looking to catch those rare problems in testing. Also, we'll have more confidence in our chosen isolation levels with such testing.
 
10:25 PM
@NickChammas You might be able to come up with a bunch of heuristics based on certain transaction patterns, but I suspect you would need to be able to codify the transaction semantics into some consistent model - which would imply being able to capture them accurately from the code.
 

« first day (449 days earlier)      last day (4402 days later) »