|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2010-12-18 13:56 UTC] daedalusvx at gmail dot com
Description: ------------ https://launchpad.net/ubuntu/lucid/amd64/php5-memcache/3.0.4-2build1 Note: The latest build in Lucid for this is 3.0.4-2build1 and I'm not seeing a fix for the issue I'm experiencing in the changelog, so I figure I'd post here. When I request the value for a key that was never set, it appears that memcache is returning an entirely different value for a different key. Reproduce code: --------------- $memcache->get( '2fa0669ba9eb40cf2f266fc07cf4fac2::HardCache::blog::index::OUTPUT' ); Expected result: ---------------- Should not return anything as nothing was ever set to that key Actual result: -------------- The value for the key '2fa0669ba9eb40cf2f266fc07cf4fac2::XHTMLXML2ArrayDispatcherNodes' Array ( [aboutindex] => Array ( [about] => Array ( [index] => Array ( [Localizations] => Array ( [0] => Array ( [countryCode] => [languageCode] => [variesOnUserAgent] => [dispatchPath] => AboutIndex.tpl ) ) [path] => About ) ) ) [blogindex] => Array ( [about] => Array ( [index] => Array ( [Localizations] => Array ( [0] => Array ( [countryCode] => [languageCode] => [variesOnUserAgent] => [dispatchPath] => AboutIndex.tpl ) ) [path] => About ) ) [blog] => Array ( [index] => Array ( [Localizations] => Array ( [0] => Array ( [countryCode] => [languageCode] => [variesOnUserAgent] => [dispatchPath] => BlogIndex.tpl ) ) [path] => Blog ) ) ) [contactindex] => Array ( [about] => Array ( [index] => Array ( [Localizations] => Array ( [0] => Array ( [countryCode] => [languageCode] => [variesOnUserAgent] => [dispatchPath] => AboutIndex.tpl ) ) [path] => About ) ) [blog] => Array ( [index] => Array ( [Localizations] => Array ( [0] => Array ( [countryCode] => [languageCode] => [variesOnUserAgent] => [dispatchPath] => BlogIndex.tpl ) ) [path] => Blog ) ) [contact] => Array ( [index] => Array ( [Localizations] => Array ( [0] => Array ( [countryCode] => [languageCode] => [variesOnUserAgent] => [dispatchPath] => ContactIndex.tpl ) ) [path] => Contact ) ) ) ) PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Wed Oct 22 21:00:01 2025 UTC |
I am unable to reproduce this with the following script: $memcache_obj = memcache_connect('localhost', 11211); $key = '2fa0669ba9eb40cf2f266fc07cf4fac2::XHTMLXML2ArrayDispatcherNodes'; memcache_set($memcache_obj, $key, 'foo'); $key = '2fa0669ba9eb40cf2f266fc07cf4fac2::HardCache::blog::index::OUTPUT'; $ret = memcache_get($memcache_obj, $key); var_dump($ret);I may have a similar issue. The symptoms are not identical. Content - php56 - 5.6.29 (5.6.29-1.131.amzn1) - php56-pecl-memcache - 3.0.8 (3.0.8-6.17.amzn1) - amazon linux - 3.14.35-28.38.amzn1.x86_64 #1 SMP Wed Mar 11 22:50:37 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux - mpm prefork - httpd 2.4 - (2.4.25-1.68.amzn1 ) I'm noticing stale data on read. It's not 100%, fairly low volume, ~25 per hour with a request volume of 50 million per hour. I'm able to detect the issue by either 1. processing a netcat execution from within the script 2. processing a secondary read Data Context - key - ZAPI_IDMAPPER_72752798226 - value on first read - {"zapi_identity_player_result_72752798226":"{\\"i\\":{\\"72613683383\\":\\"24\\",\\"72752798226\\":\\"1\\"},\\"n2p\\":{\\"72613683383\\":{\\"5003043\\":\\"72613683383\\"}}}"} - value on second read - {"ZAPI_IDMAPPER_72752798226":"{\\"72613683383\\":\\"24\\",\\"72752798226\\":\\"1\\"}"} - value on netcat - ["VALUE ZAPI_IDMAPPER_72752798226 0 38","{\\"72613683383\\":\\"24\\",\\"72752798226\\":\\"1\\"}","END"] Notice NetCat and the secondary read returned the same value, which is the correct value ... which is not that value returned on the initial read. I cant provide another example that mirrors the report - key - zapi_playerid_mapping|n2p|72752798226 - value on first read - {"ZAPI_IDMAPPER_72752798226":"{\\"72613683383\\":\\"24\\",\\"72752798226\\":\\"1\\"}"} - value on second read - [] - value on netcat - [END] In both cases the value returned on the first read is a value that would have been returned on a lookup at an earlier stage in the execution. In fact, in both cases, when the value returned is incorrect, the incorrect value would have been the result of the get preceding this one in the call stack (e.g. it appears to be returning stale data from the previous call to get).