The counter idea kind of reminds of what I have in
https://gerrit.wikimedia.org/r/#/c/16696/ .

I think the whole implicit commit issue is definitely pretty annoying and I
wish there was a reasonable way to address it without reasonable backwards
compatibility. rollback() is the hard case to deal with (I ended up not even
having it in that gerrit patch).

In general callers should avoid using rollback() for detecting problems or
race conditions. They should be checked up front. I put some comments about
this in the tiny IDBAccessObject interface a while ago. This avoids
complexity with "what if someone rollback". It also avoid mysql undo segment
usage (though rollback is faster in PG).

SAVEPOINTs are useful if we really need to support people rollback
transactions *and* we need nested transaction support. I think they could be
made to work, but I'm not sold on their necessity for any use cases we have.




--
View this message in context: 
http://wikimedia.7.n6.nabble.com/Nested-database-transactions-tp4983700p4983732.html
Sent from the Wikipedia Developers mailing list archive at Nabble.com.

_______________________________________________
Wikitech-l mailing list
Wikitech-l@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to