Le mardi 22 mars 2016 23:33:10 UTC+1, Shai Berger a écrit :
> It is Django's job to try, as best as it can, to fulfill these 
expectations. 

How could I disagree? Of course, if there is one single sensible, obvious 
default, that would help 99.9 % of users, like your webserver analogy, it 
should be set.

> MySql's REPEATABLE READ is unsuitable for use as a default by Django. 

This is where things are not as obvious... MySQL's REPEATABLE READ may have 
it flaws, it may cause repeating bugs because that level is a bit awry, 
with its reads and writes that don't work the same, but all in all, it IS a 
higher isolation level than READ COMMITTED. It DOES provide the REPEATABLE 
READ guarantee (for reads) that READ COMMITTED doesn't have.

For each "DELETE-SELECT-INSERT" bug that happens "because of" REP READ, how 
many, I don't know, "SELECT-SELECT-again-and-not-have-the-same-results" 
bugs are prevented by it?

That would be hard to say for sure.

For that user-transaction behavior, I'm in favor of a documentation fix. On 
the "Transaction" documentation page, have a not that read something like 
"Each backend can be configured in multiple isolation levels, and the 
isolation guarantees differ by isolation level and also between backends. 
In particular, MySQL's REP READ is weird". Maybe offer a way to select the 
desired isolation level in code, for each transaction even. Caveat emptor. 
After all, apart from SERIALIZABLE, transactions will never be perfect.

But I still want to insist on the fact that the bug discussed in the ticket 
is quite independent from the choice of the default isolation level. Sure, 
setting a lesser default isolation level fixes it coincidentally, but it 
can also be fixed (in two different ways, even) with a better use of the 
same isolation level. It shouldn't by itself justify the change of the 
default isolation level.

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/a2c9cfbe-97db-473c-9055-570fdb6a055f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to