Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#1539 closed defect (fixed)

[patch] Mutlithreading problem with QueryDict

Reported by: eugene@… Owned by: adrian
Component: Core (Other) Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

QueryDict and its base (MultiValueDict) modify their respective classes during copy(). It opens a hole for multithreaded servers resulting in random bugs. Following patch fixes it by replacing class manipulations with standard Python __copy__/__deepcopy__ methods.

Big thanks go to Alex Brown, who found the problem and load-tested the fix. It appears that #1442 and this patch solves all problems with multithreading revealed during load-testing.

Attachments (2)

django.querydict.patch (3.5 KB) - added by eugene@… 9 years ago.
A patch for the Django truck.
magic.querydict.patch (3.5 KB) - added by eugene@… 9 years ago.
A patch for the magic-removal branch.

Download all attachments as: .zip

Change History (4)

Changed 9 years ago by eugene@…

A patch for the Django truck.

Changed 9 years ago by eugene@…

A patch for the magic-removal branch.

comment:1 Changed 9 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [2577]) magic-removal: Fixed #1539: Fixed multithreading problem in QueryDict. Thanks, Eugene and Alex Brown

comment:2 Changed 9 years ago by adrian

(In [2578]) Fixed #1539 in trunk

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