[mapguide][MG35][Modified] Improve tile service thread-safety

Walt Welton-Lair walt.welton-lair at autodesk.com
Tue Feb 28 02:59:38 EST 2006


You can view the artifact detail at the following URL:

    https://mapguide.osgeo.org/servlets/Scarab/id/MG35

Type:
OS:Issue

Artifact ID:
MG35 (Improve tile service thread-safety)

Modified by:
Walt Welton-Lair
waltweltonlair (walt.welton-lair at autodesk.com)

The following modifications were made to this artifact:
---------------------------------------------------------------------

-- OS:Description set to new value:
Old value:
Every now and then the tile service unit test will encounter an error.  I tracked it down to the case where two threads are simultaneously trying to get / set the same tile.  Actually it's a bit more: two threads need to be simultaneously getting a tile, while a third thread needs to be setting one of those two tiles.

The mutex logic I implemented handled the case where you have two threads concurrently setting / getting tiles.  But when you add the third then a flaw in the logic was exposed.  As soon as one of the "GetTile" threads finished the "SetTile" thread would think it's free to start, even though there was still another "GetTile" thread active.

New value:
Every now and then the tile service unit test will encounter an error.  I tracked it down to the case where two threads are simultaneously trying to get / set the same tile.  Actually it's a bit more involved: two threads need to be simultaneously getting a tile, while a third thread needs to be setting one of those two tiles.

The mutex logic I implemented handled the case where you have two threads concurrently setting / getting tiles.  But when you add the third then a flaw in the logic was exposed.  As soon as one of the two "GetTile" threads finished the "SetTile" thread would think it's free to continue, even though there was still another "GetTile" thread active.

-- os:Status Explanation set to new value:
Code fix has been submitted.
-- OS:Status changed:
Old value:
New
New value:
Resolved



---------------------------------------------------------------------
This message was automatically generated by Project Tracker.








More information about the Mapguide_issues mailing list