commit 608c740edb897211c8d4059980894f84f6667a19 Author: Sam Morrison Date: Tue Jun 18 18:02:32 2019 +1000 Remove mysql query cache settings Query cache is deprecated in 5.7 and removed in 8.0 [1] [1] https://dev.mysql.com/doc/refman/5.7/en/query-cache.html Change-Id: Ifb1b972be570c07e2e183f1c8a9bafa3ad090a86 diff --git a/trove/templates/mysql/config.template b/trove/templates/mysql/config.template index 53e45f8..55b13cb 100644 --- a/trove/templates/mysql/config.template +++ b/trove/templates/mysql/config.template @@ -20,9 +20,6 @@ max_allowed_packet = {{ (1024 * flavor['ram']/512)|int }}K thread_stack = 192K thread_cache_size = {{ (4 * flavor['ram']/512)|int }} myisam-recover-options = BACKUP,FORCE -query_cache_type = 1 -query_cache_limit = 1M -query_cache_size = {{ (8 * flavor['ram']/512)|int }}M innodb_data_file_path = ibdata1:10M:autoextend innodb_buffer_pool_size = {{ (150 * flavor['ram']/512)|int }}M innodb_file_per_table = 1 diff --git a/trove/tests/unittests/common/test_template.py b/trove/tests/unittests/common/test_template.py index 31c49d6..762eb24 100644 --- a/trove/tests/unittests/common/test_template.py +++ b/trove/tests/unittests/common/test_template.py @@ -40,14 +40,14 @@ class TemplateTest(trove_testtools.TestCase): return found_group def validate_template(self, contents, teststr, test_flavor, server_id): - # expected query_cache_size = {{ 8 * flavor_multiplier }}M + # expected innodb_buffer_pool_size = {{ (150 * flavor_multiplier }}M flavor_multiplier = test_flavor['ram'] // 512 found_group = self._find_in_template(contents, teststr) if not found_group: raise Exception("Could not find text in template") # Check that the last group has been rendered memsize = found_group.split(" ")[2] - self.assertEqual("%sM" % (8 * flavor_multiplier), memsize) + self.assertEqual("%sM" % (150 * flavor_multiplier), memsize) self.assertIsNotNone(server_id) self.assertGreater(len(server_id), 1) @@ -55,7 +55,7 @@ class TemplateTest(trove_testtools.TestCase): rendered = self.template.render(flavor=self.flavor_dict, server_id=self.server_id) self.validate_template(rendered, - "query_cache_size", + "innodb_buffer_pool_size", self.flavor_dict, self.server_id) @@ -67,7 +67,7 @@ class TemplateTest(trove_testtools.TestCase): config = template.SingleInstanceConfigTemplate(datastore, self.flavor_dict, self.server_id) - self.validate_template(config.render(), "query_cache_size", + self.validate_template(config.render(), "innodb_buffer_pool_size", self.flavor_dict, self.server_id) def test_renderer_discovers_special_config(self):