Opened 19 years ago

Closed 19 years ago

Last modified 19 years ago

#1539 closed defect (fixed)

[patch] Mutlithreading problem with QueryDict

Reported by: eugene@… Owned by: Adrian Holovaty
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: no UI/UX: no

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

Download all attachments as: .zip

Change History (4)

by eugene@…, 19 years ago

Attachment: django.querydict.patch added

A patch for the Django truck.

by eugene@…, 19 years ago

Attachment: magic.querydict.patch added

A patch for the magic-removal branch.

comment:1 by Adrian Holovaty, 19 years ago

Resolution: fixed
Status: newclosed

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

comment:2 by Adrian Holovaty, 19 years ago

(In [2578]) Fixed #1539 in trunk

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