From:             emailforalex at gmail dot com
Operating system: any
PHP version:      5.2.6
PHP Bug Type:     Feature/Change Request
Bug description:  Memcache reads/writes are not synchronized

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 bug report at http://bugs.php.net/?id=45558&edit=1
-- 
Try a CVS snapshot (PHP 5.2): 
http://bugs.php.net/fix.php?id=45558&r=trysnapshot52
Try a CVS snapshot (PHP 5.3): 
http://bugs.php.net/fix.php?id=45558&r=trysnapshot53
Try a CVS snapshot (PHP 6.0): 
http://bugs.php.net/fix.php?id=45558&r=trysnapshot60
Fixed in CVS:                 http://bugs.php.net/fix.php?id=45558&r=fixedcvs
Fixed in release:             
http://bugs.php.net/fix.php?id=45558&r=alreadyfixed
Need backtrace:               http://bugs.php.net/fix.php?id=45558&r=needtrace
Need Reproduce Script:        http://bugs.php.net/fix.php?id=45558&r=needscript
Try newer version:            http://bugs.php.net/fix.php?id=45558&r=oldversion
Not developer issue:          http://bugs.php.net/fix.php?id=45558&r=support
Expected behavior:            http://bugs.php.net/fix.php?id=45558&r=notwrong
Not enough info:              
http://bugs.php.net/fix.php?id=45558&r=notenoughinfo
Submitted twice:              
http://bugs.php.net/fix.php?id=45558&r=submittedtwice
register_globals:             http://bugs.php.net/fix.php?id=45558&r=globals
PHP 4 support discontinued:   http://bugs.php.net/fix.php?id=45558&r=php4
Daylight Savings:             http://bugs.php.net/fix.php?id=45558&r=dst
IIS Stability:                http://bugs.php.net/fix.php?id=45558&r=isapi
Install GNU Sed:              http://bugs.php.net/fix.php?id=45558&r=gnused
Floating point limitations:   http://bugs.php.net/fix.php?id=45558&r=float
No Zend Extensions:           http://bugs.php.net/fix.php?id=45558&r=nozend
MySQL Configuration Error:    http://bugs.php.net/fix.php?id=45558&r=mysqlcfg

Reply via email to