Re: [Django] #11569: django.core.cache.backends.db has bad transaction handling

2013-03-11 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
-+-
 Reporter:  Glenn|Owner:  aaugustin
 Type:  Bug  |   Status:  closed
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:  fixed
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by Aymeric Augustin ):

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


Comment:

 In [changeset:"1b12e248ea556789e994caa8d3849f4de6a9096e"]:
 {{{
 #!CommitTicketReference repository=""
 revision="1b12e248ea556789e994caa8d3849f4de6a9096e"
 Fixed #11569 -- Wrapped DatabaseCache._base_set in an atomic block.

 The atomic block provides a clean rollback to a savepoint on failed
 writes.

 The ticket reported a race condition which I don't know how to test.
 }}}

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #11569: django.core.cache.backends.db has bad transaction handling

2013-03-07 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
-+-
 Reporter:  Glenn|Owner:  aaugustin
 Type:  Bug  |   Status:  assigned
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by aaugustin):

 * status:  new => assigned
 * owner:  nobody => aaugustin


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #11569: django.core.cache.backends.db has bad transaction handling

2013-02-24 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
-+
 Reporter:  Glenn|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  master
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+

Comment (by aaugustin):

 Support for savepoints in SQLite and fixing #2227 are pre-requisites.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.




Re: [Django] #11569: django.core.cache.backends.db has bad transaction handling

2011-12-17 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
-+
 Reporter:  Glenn|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Core (Cache system)  |  Version:  SVN
 Severity:  Normal   |   Resolution:
 Keywords:   | Triage Stage:  Accepted
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+
Changes (by aaugustin):

 * component:  Database layer (models, ORM) => Core (Cache system)
 * stage:  Design decision needed => Accepted


-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11569: django.core.cache.backends.db has bad transaction handling

2011-10-21 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
-+-
 Reporter:  Glenn|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Design
 Keywords:   |  decision needed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-

Comment (by gerdemb):

 The attached patch modifies the _base_set() function for the database
 backend so that the INSERT INTO statement will not insert duplicated cache
 keys. It uses an SQL "trick", but it is standard SQL and should be
 compatible with all the database backends. I've been using it with success
 on PostgreSQL.

-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11569: django.core.cache.backends.db has bad transaction handling

2011-10-21 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
-+-
 Reporter:  Glenn|Owner:  nobody
 Type:  Bug  |   Status:  new
Component:  Database layer   |  Version:  SVN
  (models, ORM)  |   Resolution:
 Severity:  Normal   | Triage Stage:  Design
 Keywords:   |  decision needed
Has patch:  0|  Needs documentation:  0
  Needs tests:  0|  Patch needs improvement:  0
Easy pickings:  0|UI/UX:  0
-+-
Changes (by gerdemb):

 * cc: gerdemb (added)
 * ui_ux:   => 0
 * easy:   => 0


-- 
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 post to this group, send email to django-updates@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en.



Re: [Django] #11569: django.core.cache.backends.db has bad transaction handling

2009-11-22 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
---+
  Reporter:  Glenn | Owner:  nobody
Status:  new   | Milestone:
 Component:  Database layer (models, ORM)  |   Version:  SVN   
Resolution:|  Keywords:
 Stage:  Design decision needed| Has_patch:  0 
Needs_docs:  0 |   Needs_tests:  0 
Needs_better_patch:  0 |  
---+
Comment (by kylemacfarl...@gmail.com):

 This bug is making the DB cache backend unusable. Even moderate load will
 start raising TransactionManagementError because rollback() is called even
 if there is no transaction.

 In short, the block that catches the DatabaseError either wrecks your
 transaction (if there is a transaction) as Glenn mentioned or raises
 another exception (if there isn't a transaction).

-- 
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 post to this group, send email to django-upda...@googlegroups.com.
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=.




[Django] #11569: django.core.cache.backends.db has bad transaction handling

2009-07-27 Thread Django
#11569: django.core.cache.backends.db has bad transaction handling
--+-
 Reporter:  Glenn |   Owner:  nobody
   Status:  new   |   Milestone:
Component:  Database layer (models, ORM)  | Version:  SVN   
 Keywords:|   Stage:  Unreviewed
Has_patch:  0 |  
--+-
 (This problem is manifesting in core.cache, but the real problem is in
 db.transaction, so I've marked this as a DB problem.)

 The database backend for caching handles transactions badly.

 When inserting a cache key, it searches for an existing cache key.  If
 found, it does an UPDATE.  If not found, it does an INSERT.  The INSERT
 case can lead to a constraint violation, if another thread inserts that
 key between the SELECT and the INSERT.  The code expects this, and catches
 DatabaseError.

 This rolls back the whole transaction, including anything the caller is
 doing.  It needs a savepoint for this, so it only rolls back its own work.

 To handle this sanely, transaction support really needs to require
 savepoints, so it can expose a helper to start and commit a nested
 transaction, eg. db.transaction.run_in_transaction(func):

  - If a transaction is started already, start a savepoint; when finished,
 release the savepoint.
  - If a transaction is not started, start one (typically a no-op due to
 non-autocommit); when finished, commit.
  - On exception, rollback whichever it started.

 Savepoints are supported by all production-quality databases (including
 MySQL, Postgres and SQLite), so requiring them in the backend seems
 reasonable.  I've hit the need for nested transactions in Django so many
 times I had to write my own wrapper to implement this.

-- 
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 post to this group, send email to django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~--~~~~--~~--~--~---