Jump to content

Multi-node cache invalidation


javiohayo

Recommended Posts

Hi,

 

we have a multi-node PS architecture running version 1.6.1.4 with a shared memcached server. 

 

The problem that we have is that changes done in the database, such a stock changes, new products, etc are not visible until we flush the memcached memory.

 

After some investigation, we think that the problem is due to a race condition when setting the "master key" with all the related keys to a given table. As all nodes have the "sql_shared_tables" array in memory when the cache is invalidated after an SQL operation, the node that received the update successfully invalidate all table related keys, but instants later, another node puts again the already invalidated keys in memcached, as it still have them in its own memory.

 

I see this patch https://github.com/csupnig/Prestashop-Memcached-Fix for PS 1.4 but it seems that is was never ported to the main branch.

 

All nodes have the same config (config/settings.inc.php) and share the memcached and DB servers.

 

Is there anyway to by-pass this behaviour? Does anybody have a running PS multi-node (cluster) with a shared memcached server running fine?

 

Thanks in advance,

 

 

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...