Opened 7 years ago

Last modified 7 years ago

#28596 closed Bug

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

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 (last modified by Tim Graham)

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 id__in 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 (1)

comment:1 by Tim Graham, 7 years ago

Description: modified (diff)

Can you confirm if the issue affects the Django master branch with Oracle 12? Django 2.0 (the master branch) drops support for Oracle 11.2. Unless this is a regression from previous Django releases, we won't fix the issue in Django 1.11.

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