« first day (4266 days earlier)      last day (900 days later) » 

05:14
A chairde - Morning all!
05:42
Morning
@ErikDarling becoming more influential it seems
Expect a call from Red Gate
06:12
Morning
 
2 hours later…
08:23
Morning, on this first day of the third Carolean era, how's it for all you in "the colonies"? May QEII be successfully migrated to that great blob storage in the Cloud, and may the new installation go smoothly without too much downtime.
 
2 hours later…
09:53
Starting with Monday I have a week off
 
2 hours later…
11:39
Your week off doesn't start on Saturday? šŸ˜œ
It doesn't, we still have some commitments on Monday, but I'm not going to work :)
11:58
@Zikato Sounds like your week off starts on Saturday then.
> I'm not going to work
@JoshDarnell Don't you have Erik's website to fix? šŸ˜
@Zikato Oh, right.
@MichaelGreen that's really cool, thank you
12:20
How would you calm people about switching RCSI on? They are only worried about the white/black marble problem
lemme guess which post they linked you to...
I'm guessing you'll guess it
i really fucking hate that post
for that post specifically, snapshot isolation is different from read committed snapshot isolation. rcsi is not available for modifications, so you don't have that for concurrent modifications. you can still hit it with concurrency reads and modifications.
there are some modification patterns like a read and then a write that would hit it, but local locking and isolation hints can get you around that.
12:34
yeah, it's not the only post out there
https://littlekendra.com/2016/02/18/how-to-choose-rcsi-snapshot-isolation-levels/#cheat-sheet-for-snapshot-and-rcsi
@Zikato Isolation phenomena are far more prevalent under READ COMMITTED, so they really should stop worrying
oh i know
Genuine question after reading that post.
yeah, that's the other thing (i'm writing a post about it), read committed is a garbage isolation level. but most people i talk to have nolock hints on every query (including modifications) so ???
> If you try this same experiment with serializable isolation, one transaction will wait for the other to complete and, depending on the order, both marbles will end up either white or black.
12:35
their database is a mess. They have nolocks everywhere anyway. I'm not sure which argument to use
is this true? ^^
@ypercubeįµ€į“¹ let's find out!
yup, I've tested and it makes sense
@ypercubeįµ€į“¹ Yes.
also verified
12:47
@MichaelGreen always? Does it not depend on locks taken?
At serializable isolation the result has to be consistent with one transaction running to completion as though it had the whole machine to itself and then the other running.
I know. I am asking if the implementation of SERIALIZABLE in SQL Server guarantees that.
only with tables named marbles with two rows
Greeks are always triggered by any mention of marbles.
I'll defer to Zikato 7 8 comments up.
12:52
I've lost my marbles long time ago
Is the RCSI race condition risk any different than if you were to read and save results into a temp table and then do an update? Between the reading and updating the data could have been changed.
Concurrency is hard
I concur
create table a ( x int );
create table b ( x int );

-- Session 1 at serializable isolation
insert into a select count(*) from b

-- Session 2 at serializable isolation, concurrently
insert into b select count(*) from a
I like that example of write skew. Both tables can end up containing zero under snapshot isolation (SI).
@ErikDarling I was just typing exactly the same thing :-)
further proof eh
@PaulWhite i like how you commented that the session is serializable instead of writing the set isolation level syntax
13:01
I've read SI as a Snapshot Isolation
So back to the question. Is there anything I can do to mitigate the risk or it's not a big deal anyway?
unless you have processes that depend on blocking under read committed for correctness (like processing a queue) then it's not going to be a big deal
if your reader/writer blocking and deadlocking problems are profound enough to warrant the suggestion in the first place, then that's the prescription
@ErikDarling I like this take!
I don't worry so much about the tempdb impact of RCSI these days, but triggers used to enforce any kind of RI do need careful review, and probably READCOMMITTEDLOCK hints.
And yes, code written to assume blocking occurs, when it no longer will.
Well, once I've found a transaction that has been opened for 14 hours and the version store grew to 300GB (without SI/RCSI) probably from triggers only
13:16
It's not just size though. Increasing the point-in-time load on tempdb might be an issue if it's already close to its limits.
Sounds like a trigger problem
only 500 Triggers, they'll be fine
btw: I don't expect change from an Azure Feedback item but on the off-chance
https://feedback.azure.com/d365community/idea/68a73199-0a30-ed11-a81b-000d3a04ded5
@ypercubeįµ€į“¹ SQL Server uses strict two-phase locking with key-range (predicate) locks to enforce serializable. If you trust that arrangement, the answer is yes.
13:32
in god we trust. all others use serializable.
@PaulWhite so you are saying if there is 1 row with White and 1 row with Black and in between a million other rows with Red, it might take non-overlapping key range locks and not work as expected?
@ypercubeįµ€į“¹ No, I'm not saying that at all. I'm saying if you trust the long-established scheme of S2PL and range locks to deliver serializability, so does SQL Server.
In the example, reading white marbles locks the entire range white marbles would fall in, so no other concurrent process can insert a white marble until the first transaction has ended.
Right, I get it.
The example in the post isn't great because there isn't an index on the marble colour
Indexes are required for key-range locks, obviously
You'd still get serializability, but table locks would be involved
I've been told by reliable sources that heaps are the best
13:48
They're certainly nice and simple
Well, simple anyway
And there's always mourning in them
@Zikato Added my vote for what it's worth
Thank you
 
2 hours later…
15:31
is there any way to decode the clientoption1 and clientoption2 in deadlock xml?
 
2 hours later…
17:12
@ErikDarling Yes, I'll hit you up later if it's not time sensitive
@SeanGallardy-MostlyRetired not at all
thanks
@SeanGallardy-MostlyRetired can you write it here, please? I'm also interested in this
i'll blog about it
the transcript is not good documentation
17:36
It's too bad that your blog tweets don't show the preview. I'd eventually love to read all of those, but sometimes I'm lazy
they're not going anywhere
or maybe they will
i'm feeling pretty spiteful after writing 1000 posts but not being in the top 100
@Zikato Looks like Erik is going to do a blog post, solves that and saves me from having to do one :D
@ErikDarling travesty of justice
17:52
@SeanGallardy-MostlyRetired i still don't know how to do it, so uh... any points are still welcome
 
2 hours later…
20:20
> Please be aware that this investigation might take some time.
It's taken 2.5 months so far, I'm aware šŸ¤£
How did you get on the fast track?
Did you Tweet about it
20:52
No.

« first day (4266 days earlier)      last day (900 days later) »