magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.49k stars 9.3k forks source link

Magento doesn't work with Redis in cluster mode #39224

Open speller opened 1 day ago

speller commented 1 day ago

Preconditions and environment

Steps to reproduce

Run cache clean command

Expected result

It works properly

Actual result

Error

Error cleaning cache by mode matchingTag: CROSSSLOT Keys in request don't hash to the same slot
#0 /magento/vendor/colinmollenhour/cache-backend-redis/Cm/Cache/Backend/Redis.php(1010): Zend_Cache::throwException('Error cleaning ...', Object(CredisException))
#1 /magento/vendor/magento/zend-cache/library/Zend/Cache/Core.php(465): Cm_Cache_Backend_Redis->clean('matchingTag', Array)\n#2 /magento/vendor/magento/framework/Cache/Core.php(92): Zend_Cache_Core->clean('matchingTag', Array)
#3 /magento/vendor/magento/framework/Cache/Frontend/Adapter/Zend.php(103): Magento\\Framework\\Cache\\Core->clean('matchingTag', Array)\n#4 /magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(89): Magento\\Framework\\Cache\\Frontend\\Adapter\\Zend->clean('matchingTag', Array)
#5 /magento/vendor/magento/framework/Cache/Frontend/Decorator/TagScope.php(76): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->clean('matchingTag', Array)
#6 /magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(89): Magento\\Framework\\Cache\\Frontend\\Decorator\\TagScope->clean('matchingTag', Array)
#7 /magento/vendor/magento/framework/Cache/Frontend/Decorator/Logger.php(47): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->clean('matchingTag', Array)
#8 /magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(89): Magento\\Framework\\Cache\\Frontend\\Decorator\\Logger->clean('matchingTag', Array)
#9 /magento/vendor/magento/framework/App/Cache/Type/AccessProxy.php(107): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->clean('matchingTag', Array)
#10 /magento/vendor/magento/framework/Cache/Frontend/Decorator/Bare.php(89): Magento\\Framework\\App\\Cache\\Type\\AccessProxy->clean('matchingTag', Array)
#11 /magento/vendor/magento/framework/Cache/Frontend/Decorator/TagScope.php(76): Magento\\Framework\\Cache\\Frontend\\Decorator\\Bare->clean('matchingTag', Array)
#12 /magento/vendor/magento/module-page-cache/Model/Cache/Type.php(52): Magento\\Framework\\Cache\\Frontend\\Decorator\\TagScope->clean('matchingTag', Array)
#13 /magento/vendor/magento/module-page-cache/Observer/FlushAllCache.php(66): Magento\\PageCache\\Model\\Cache\\Type->clean()

Additional information

No response

Release note

No response

Triage and priority

m2-assistant[bot] commented 1 day ago

Hi @speller. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce.

hostep commented 1 day ago

I'm not sure this should be reported to Magento, maybe a better place to report it would be to one of the colinmollenhour redis repo's that deal with the communication from Magento to Redis.

I think there are already some (old) attempts at adding that functionality, just posting some links, I'm not familiar with the technology so no idea if these make sense for your request:

speller commented 19 hours ago

@hostep the referenced PR suggests adding a new client class and Magento should also add support for it. So some work on the Magento side is also required.