Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 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@… 8 years ago.
A patch for the Django truck.
magic.querydict.patch (3.5 KB) - added by eugene@… 8 years ago.
A patch for the magic-removal branch.

Download all attachments as: .zip

Change History (4)

Changed 8 years ago by eugene@…

A patch for the Django truck.

Changed 8 years ago by eugene@…

A patch for the magic-removal branch.

comment:1 Changed 8 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 8 years ago by adrian

(In [2578]) Fixed #1539 in trunk

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.