#17956: Explicit closing cursors is required for the consistency in multithread environment -------------------------------------+------------------------------------- Reporter: nnseva | Owner: nobody Type: | Status: new Cleanup/optimization | Version: 1.3 Component: Database layer | Resolution: (models, ORM) | Triage Stage: Accepted Severity: Normal | Needs documentation: 0 Keywords: thread, threading, | Patch needs improvement: 0 cursor, close, finalization, | UI/UX: 0 __del__, out of sync, twisted | Has patch: 1 | Needs tests: 0 | Easy pickings: 0 | -------------------------------------+------------------------------------- Changes (by akaariai):
* needs_better_patch: => 0 * stage: Unreviewed => Accepted * needs_tests: => 0 * needs_docs: => 0 Comment: The reasoning in the description seems valid. I guess the error is the garbage collector tries to collect the cursor while another thread is doing some work. Seems like some backend libraries do not like that. I haven't actually tested this, but in any case closing cursors explicitly is recommended, and we should do it. It would be great if you could provide a self-contained test case. Of course, having a test in Django's test suite would be perfect, but seems hard to achieve. -- Ticket URL: <https://code.djangoproject.com/ticket/17956#comment:1> 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 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.