Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-04-10 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin ):

 In [changeset:"1bcc8eb0f64831b24c2769e033a10e530c8ed140"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1bcc8eb0f64831b24c2769e033a10e530c8ed140"
 [1.7.x] Increased robustness of 58161e4e. Refs #22291.

 Backport of ee837b9a from master
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.490b38252535f231c8dd19249de4b21a%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-04-10 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin ):

 In [changeset:"7e89434084d7952d107aef1c41f2019a73310634"]:
 {{{
 #!CommitTicketReference repository=""
 revision="7e89434084d7952d107aef1c41f2019a73310634"
 [1.7.x] Fixed #22291 -- Avoided shadowing deadlock exceptions on MySQL.

 Thanks err for the report.

 Backport of 58161e4e from master.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.e8197da63e1462c637db71b4abcec614%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-04-10 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin ):

 In [changeset:"80f6cbbadbd33574c8b949a8fbc77a5e94398e54"]:
 {{{
 #!CommitTicketReference repository=""
 revision="80f6cbbadbd33574c8b949a8fbc77a5e94398e54"
 [1.6.x] Increased robustness of 58161e4e. Refs #22291.

 Backport of ee837b9a from master
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.d821d2d66e466d45fe8c6f0066f4ebcd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-04-10 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin ):

 In [changeset:"9afedbef4207a86d17d9525664bcd06f403cc6f9"]:
 {{{
 #!CommitTicketReference repository=""
 revision="9afedbef4207a86d17d9525664bcd06f403cc6f9"
 [1.6.x] Fixed #22291 -- Avoided shadowing deadlock exceptions on MySQL.

 Thanks err for the report.

 Backport of 58161e4e from master.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.050b44afad6a6e859082117d7090c2bd%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-04-10 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by Aymeric Augustin ):

 In [changeset:"ee837b9a0d08fea1e499bec3b094851a1bbe"]:
 {{{
 #!CommitTicketReference repository=""
 revision="ee837b9a0d08fea1e499bec3b094851a1bbe"
 Increased robustness of 58161e4e. Refs #22291.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.c7599c933cfc23095c3df8ac7f93527d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-23 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  fixed
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aymeric Augustin ):

 * status:  new => closed
 * resolution:   => fixed


Comment:

 In [changeset:"58161e4e93d1fc796fc804c943028d4433f4813c"]:
 {{{
 #!CommitTicketReference repository=""
 revision="58161e4e93d1fc796fc804c943028d4433f4813c"
 Fixed #22291 -- Avoided shadowing deadlock exceptions on MySQL.

 Thanks err for the report.
 }}}

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.025b32bd541168bb589d59e1fa278ccf%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-23 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 Aaaah, of course, I need another thread! Thank you, hopefully I'll be able
 to reproduce now.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.11043e7677dda51f42ad6670981f326d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-23 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by err):

 https://github.com/errx/django/commit/2cc691b6ad0a07438c6b84d3293410a4c0a62012

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.8b88f134e8439ebe6d5e0b1c5661c017%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-23 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by err):

 I guess the problem is that here

 {{{
 +Reporter.objects.create(id=1, first_name="Tintin")
 +cursor2.execute("UPDATE transactions_reporter SET id
 = 2 WHERE NOT id = 1;")
 }}}

 This two lines should run in parallel. I'll give you more info tomorrow.
 thanks for patience :)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.98b5d53dc8d2d4502b911451524006db%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-23 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 I don't understand why deadlocks aren't detected in my tests. I tried
 another example based on http://www.xaprb.com/blog/2006/08/08/how-to-
 deliberately-cause-a-deadlock-in-mysql/ and MySQL also timeouts instead of
 detecting the deadlock:

 {{{
 with transaction.atomic():
 Reporter.objects.create(first_name="Tintin")
 with self.conn2.cursor() as cursor2:
 cursor2.execute("SELECT * FROM transactions_reporter FOR
 UPDATE;")
 Reporter.objects.create(first_name="Archibald",
 last_name="Haddock")
 }}}

 {{{
29 Query set autocommit=0
25 Query set autocommit=0
25 Query INSERT INTO `transactions_reporter`
 (`first_name`, `last_name`, `email`) VALUES ('Tintin', '', '')
29 Query SELECT * FROM transactions_reporter FOR
 UPDATE
 # timeout after innodb_lock_wait_timeout (50 seconds)
 }}}

 All the information I can find about InnoDB says that deadlocks should
 always be detected. `innodb_table_locks` is enabled and `autocommit` is
 explicitly set to 0 as shown in the query log.

 Can you provide an example of Python code that triggers the issue you're
 reporting? If I can't reproduce the issue, I can't fix it.

 (Given that MySQL's transaction handling is an unreliable, bolted-on mess
 that doesn't make much sense in general, I'm not surprised to see
 inconsistent behavior. If you care about transactions, you should use a
 database that actually works.)

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.81630d953a1efafe2fbb0e1fa1e412b9%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-23 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 I've written a test that reproduces the sequence of queries you're
 describing. Here's the diff:

 {{{
 #!diff
 --- a/tests/transactions/tests.py
 +++ b/tests/transactions/tests.py
 @@ -3,7 +3,10 @@ from __future__ import unicode_literals
  import sys
  from unittest import skipIf, skipUnless

 -from django.db import connection, transaction, DatabaseError,
 IntegrityError
 +from django.conf import settings
 +from django.db import (connection, DEFAULT_DB_ALIAS,
 +DatabaseError, IntegrityError, transaction)
 +from django.db.utils import ConnectionHandler
  from django.test import TransactionTestCase, skipIfDBFeature
  from django.utils import six

 @@ -333,6 +336,34 @@ class AtomicErrorsTests(TransactionTestCase):
  self.assertEqual(Reporter.objects.get(pk=r1.pk).last_name,
 "Calculus")


 +@skipUnless(connection.vendor == 'mysql', "MySQL-specific behaviors")
 +class AtomicMeetsMySQLTests(TransactionTestCase):
 +
 +available_apps = ['transactions']
 +
 +def setUp(self):
 +# Create a second connection to the default database.
 +new_connections = ConnectionHandler(settings.DATABASES)
 +self.conn2 = new_connections[DEFAULT_DB_ALIAS]
 +self.conn2.set_autocommit(False)
 +
 +def tearDown(self):
 +# Close down the second connection.
 +self.conn2.rollback()
 +self.conn2.close()
 +
 +def test_implicit_savepoint_rollback(self):
 +"""MySQL implicitly rolls back savepoints when it deadlocks
 (#22291)."""
 +with self.conn2.cursor() as cursor2:
 +cursor2.execute("INSERT INTO transactions_reporter (id,
 first_name) VALUES (1, 'Tintin');")
 +# Double atomic to enter a transaction and create a
 savepoint.
 +with transaction.atomic():
 +with transaction.atomic():
 +Reporter.objects.create(id=1, first_name="Tintin")
 +cursor2.execute("UPDATE transactions_reporter SET id
 = 2 WHERE NOT id = 1;")
 +self.conn2.commit()
 +# At this point, there's a deadlock on the main
 connection?
 +
  class AtomicMiscTests(TransactionTestCase):

  available_apps = []
 }}}

 Since I want the deadlock to happen on the main connection, connection 1
 in your original report is `self.conn2` in the test and connection 2 is
 the main connection.

 Unfortunately, I cannot reproduce the results you're seeing, because I'm
 reaching the point where you say MySQL should deadlock.

 {{{
 (django-dev)myk@mYk tests % ./runtests.py --settings=test_mysql
 transactions.tests.AtomicMeetsMySQLTests
 Testing against Django installed in
 '/Users/myk/Documents/dev/django/django'
 Creating test database for alias 'default'...
 Creating test database for alias 'other'...
 E
 ==
 ERROR: test_implicit_savepoint_rollback
 (transactions.tests.AtomicMeetsMySQLTests)
 MySQL implicitly rolls back savepoints when it deadlocks (#22291).
 --
 Traceback (most recent call last):
   File "/Users/myk/Documents/dev/django/tests/transactions/tests.py", line
 362, in test_implicit_savepoint_rollback
 Reporter.objects.create(id=1, first_name="Tintin")
   File "/Users/myk/Documents/dev/django/django/db/models/manager.py", line
 84, in manager_method
 return getattr(self.get_queryset(), name)(*args, **kwargs)
   File "/Users/myk/Documents/dev/django/django/db/models/query.py", line
 367, in create
 obj.save(force_insert=True, using=self.db)
   File "/Users/myk/Documents/dev/django/django/db/models/base.py", line
 603, in save
 force_update=force_update, update_fields=update_fields)
   File "/Users/myk/Documents/dev/django/django/db/models/base.py", line
 631, in save_base
 updated = self._save_table(raw, cls, force_insert, force_update,
 using, update_fields)
   File "/Users/myk/Documents/dev/django/django/db/models/base.py", line
 712, in _save_table
 result = self._do_insert(cls._base_manager, using, fields, update_pk,
 raw)
   File "/Users/myk/

Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-23 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by aaugustin):

 OK, so this is about not masking the original exception when rolling back
 to a savepoint fails.

 This problem only affects Python 2, which lacks the exception chaining
 automatically provided by Python 3.

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.2c315511484a30e991f34a53bec3eb02%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-21 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  new
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by err):

 * status:  closed => new
 * resolution:  needsinfo =>


Comment:

 >> I assume Django raises an exception when trying to rollback to the
 savepoint that no longer exists

 the problem is that Django is trying to rollback to the savepoint. this is
 incorrect in mysql

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.202287c05c6bb8e5fde4a48840950575%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-21 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by err):

 I thing Django should rollback whole transaction and raise normal error
 django.db.utils.OperationalError: (1213, 'Deadlock found when trying to
 get lock; try restarting transaction') not
 django.db.utils.OperationalError: (1305, 'SAVEPOINT s139640098436864_x1
 does not exist')

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.86010ff290de19414a9240c31916d22e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.


Re: [Django] #22291: transactions.atomic (with savepoints) doesn't work correctly with deadlocks in mysql

2014-03-20 Thread Django
#22291: transactions.atomic (with savepoints) doesn't work correctly with 
deadlocks
in mysql
-+-
 Reporter:  err  |Owner:  nobody
 Type:  Uncategorized|   Status:  closed
Component:  Database layer   |  Version:  1.6
  (models, ORM)  |   Resolution:  needsinfo
 Severity:  Normal   | Triage Stage:
 Keywords:   |  Unreviewed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

 * status:  new => closed
 * needs_docs:   => 0
 * resolution:   => needsinfo
 * needs_tests:   => 0
 * needs_better_patch:   => 0


Comment:

 I assume Django raises an exception when trying to rollback to the
 savepoint that no longer exists, which eventually leads to the entire
 transaction being rolled back. This appears to be the correct behavior.

 What do you suggest Django should do instead?

-- 
Ticket URL: 
Django 
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/061.7f1a5e475703a781c3814cfb70cb0d3c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.