*: replace erp5_site_global_id by a mechanism in test framework
erp5_site_global_id was from the tiolive time, when we were ERP5 with mariadb and memcached instances shared by many zope instances, this was used as a way to implement some namespace in memcached, to prevent conflicts such as two different zope using the same cache keys. Nowadays, we no longer share memcached, an ERP5 instance has its own memcached and this prefixing is no longer needed, but there is still one exception, when we run test using runTestSuite with --node_quantity higher than 1, then we have multiple running test instances sharing the same mariadb and the same memcached. In that case, each test instance uses a different mariadb database, so use this information to use as a prefix for memcached. This was more or less the current implementation, but we were setting erp5_site_global_id on the wrong object, so it was not working since 4889d523 (Define property's default value at class level., 2012-12-31) and because it was not working we did not realize that using such a long prefix was not practical, because memcached keys are limited in size, to overcome this, we don't use the full connection string (which is around 70 characters), but a short hash of the connection string.
Showing
Please register or sign in to comment