#23646: Add QuerySet.bulk_update() to to efficiently update many models
-------------------------------------+-------------------------------------
     Reporter:  Brillgen Developers  |                    Owner:  Tom
                                     |  Forbes
         Type:  New feature          |                   Status:  closed
    Component:  Database layer       |                  Version:  1.9
  (models, ORM)                      |
     Severity:  Normal               |               Resolution:  fixed
     Keywords:                       |             Triage Stage:  Accepted
    Has patch:  1                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------

Comment (by Mariusz Felisiak <felisiak.mariusz@…>):

 In [changeset:"d35ce682e31ea4a86c2079c60721fae171f03d7c" d35ce682]:
 {{{
 #!CommitTicketReference repository=""
 revision="d35ce682e31ea4a86c2079c60721fae171f03d7c"
 Fixed #33506 -- Made QuerySet.bulk_update() perform atomic writes against
 write database.

 The lack of _for_write = True assignment in bulk_update prior to
 accessing self.db resulted in the db_for_read database being used to
 wrap batched UPDATEs in a transaction.

 Also tweaked the batch queryset creation to also ensure they are
 executed against the same database as the opened transaction under all
 circumstances.

 Refs #23646, #33501.
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/23646#comment:18>
Django <https://code.djangoproject.com/>
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/066.2128d3fef372e2efe32945cac1e6f583%40djangoproject.com.

Reply via email to