ID:               45558
 Updated by:       [EMAIL PROTECTED]
 Reported By:      emailforalex at gmail dot com
-Status:           Open
+Status:           Bogus
 Bug Type:         Feature/Change Request
 Operating System: any
 PHP Version:      5.2.6
 New Comment:

Sorry, but your problem does not imply a bug in PHP itself.  For a
list of more appropriate places to ask for help using PHP, please
visit http://www.php.net/support.php as this bug system is not the
appropriate forum for asking support questions.  Due to the volume
of reports we can not explain in detail here why your report is not
a bug.  The support channels will be able to provide an explanation
for you.

Thank you for your interest in PHP.

This is a problem with the application design, you need to do some sort
of locking before you read and write the value.


Previous Comments:
------------------------------------------------------------------------

[2008-07-18 19:14:46] emailforalex at gmail dot com

Description:
------------
This "bug" is incredibly hard to track down and reproduce, but is a
major issue for high-volume sites using memcache. There is no
synchronization mechanism built in when multiple servers serving
multiple requests are all trying to read/write to a memcache machine.

A race condition occurs where one request (r1) reads from the cache,
then a second request (r2) reads from the cache, then r1 writes the same
key back to the cache and r2 proceeds to also write that key to the
cache. In effect, r2 overwrites the changes by r1.

The issue was discovered while using the symfony framework which stores
an array of all of its keys in the cache to allow for pattern-based
searching of the keys. What sometimes happened is that two writes in a
row would happen as described above, and the keys that were added to the
array during the first write disappeared.



------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=45558&edit=1

Reply via email to