-
Bug
-
Resolution: Fixed
-
Blocker
-
3.1.2, 3.2
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MOODLE_31_STABLE, MOODLE_32_STABLE
-
MDL-56675-master -
It's become apparent during testing of MDL-56273 that the memcached server breaks silently for us and has done since memcached version 1.4.23 when they rewrote their slab behaviour.
What does this mean: Well, because we use getAllKeys to purge caches on shared instances, and getAllKeys returns false in this error situation, which evaluates to empty, and which means there are no keys, we never purge the memcached cache.
Since we don't have any error checking, we silently accept all of this.
This is potentially a major problem as the cache is constantly left stale if it has been configured to be shared.
This functionality was introduced by MDL-48506, and MDL-53967 has further hidden the issue.
I would propose that we remove the memcached plugin from core ASAP as there has been no movement on the issue in https://github.com/php-memcached-dev/php-memcached/issues/203
It looks like this is down to the way in which the php memcached driver fetchs all keys - it blindly interrogates all of the slabs from 0 to 63. However, 63 is an invalid slab and with the rewrite of slab support in memcached 1.4.23, this errors in memcached instead of exiting.
Really this is a bug in php-memcached, as a result of a change of protocol response in memcached as a whole.
This has been broken since April 2015.
The real problems for us are:
- we do not check the result of hasAllKeys properly
- we continue to use the cache without purging it
- we have no way to inform admins that it's broken
- has a non-specific relationship to
-
MDL-58682 Strange failure in memcached tests
- Closed
-
MDL-58752 cachestore_memcached_test::test_multi_use_compatibility fails on php56
- Closed
- has been marked as being related by
-
MDL-60037 cachestore_memcached_test::test_multi_use_compatibility is failing again with memcached 1.5.0
- Closed