#1601 closed defect (fixed)
MgLayer constructor is not thread safe
Reported by: | trevorwekel | Owned by: | trevorwekel |
---|---|---|---|
Priority: | high | Milestone: | 2.2 |
Component: | Web API | Version: | 2.2.0 |
Severity: | critical | Keywords: | |
Cc: | External ID: |
Description
Drop the attached aspx script in the mapviewernet folder and run it with a multi-user load. The MgLayer(resource id, resource service) constructor will fail and cease to execute on subsequent requests.
Attachments (2)
Change History (8)
by , 14 years ago
Attachment: | testMgLayer.aspx added |
---|
comment:1 by , 14 years ago
The following variable in http://trac.osgeo.org/mapguide/browser/trunk/MgDev/Common/MdfParser/IOUtil.cpp?rev=29 is not thread safe. A workaround patch is attached. The more correct fix is to rewrite the tabcount logic.
int tabcount = 0;
comment:2 by , 14 years ago
Based on performance testing, I have replaced the SerializeToXML call with a read of the original bytes from the call to MgResourceService.GetResourceContent. This should also speed up the MgLayer constructor.
comment:3 by , 14 years ago
Owner: | set to |
---|
Patch has been verified with 72+ hours of load testing. It may also fix the WMS errors reported on the mapguide-users list.
Patch submitted to branches/2.2 in r5567
comment:5 by , 14 years ago
The change was submitted to sandbox/adsk/2.2gp r5580 in another submission.
Simple test script to reproduce defect