Opened 7 years ago

Last modified 7 years ago

#28596 closed Bug

Oracle 11.2 + large search related = boom in instance.delete() — at Initial Version

Reported by: Markus Stenberg Owned by: nobody
Component: Database layer (models, ORM) Version: dev
Severity: Normal Keywords:
Cc: Mariusz Felisiak Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Given model B, which has foreign key to model A (and delete=CASCADE).

If deleting A instance with 100k references from different B instances, Oracle closes connection and the Oracle worker dies to ORA-0600.

Reason:

Django does search_related with idin of 100k different ids. Oracle (at least 11.2) cannot handle it and blows up. (This is known by Oracle IIRC but not fixed at least not in 11.)

Workaround:

provide bulk_batch_size with e.g. 5000 maximum number of items in a query.


Change History (0)

Note: See TracTickets for help on using tickets.
Back to Top