Opened 3 years ago
Closed 3 years ago
#33506 closed Bug (fixed)
QuerySet.bulk_update() should perform atomic writes against routed db_for_write.
Description ¶
Discovered in https://code.djangoproject.com/ticket/33501#comment:3 but the summary is that bulk_update
doesn't set self._for_write = True
prior to accessing self.db
so the latter is actually db_for_read
and that includes the transaction.atomic
block creation.
Change History (4)
comment:1 by , 3 years ago
Summary: | bulk_update perform atomic writes against routed db_for_write → QuerySet.bulk_update() should perform atomic writes against routed db_for_write. |
---|---|
Triage Stage: | Unreviewed → Accepted |
comment:2 by , 3 years ago
Has patch: | set |
---|
comment:3 by , 3 years ago
Triage Stage: | Accepted → Ready for checkin |
---|
Note:
See TracTickets
for help on using tickets.
Good catch!