diff --git a/attributes/default.rb b/attributes/default.rb index 55410378..3ee98baa 100644 --- a/attributes/default.rb +++ b/attributes/default.rb @@ -100,7 +100,7 @@ default['percona']['server']['max_connections'] = 30 default['percona']['server']['max_connect_errors'] = 9_999_999 default['percona']['server']['sql_modes'] = [] -default['percona']['server']['table_cache'] = 8172 +default['percona']['server']['table_cache'] = 8192 default['percona']['server']['table_definition_cache'] = '-1' # <5.6, use 4096 default['percona']['server']['group_concat_max_len'] = 4096 default['percona']['server']['expand_fast_index_creation'] = false @@ -110,7 +110,7 @@ # Query Cache Configuration default['percona']['server']['query_cache_size'] = '64M' default['percona']['server']['query_cache_limit'] = '2M' -default['percona']['server']['query_cache_type'] = '1' +default['percona']['server']['query_cache_type'] = '0' # Logging and Replication default['percona']['server']['sync_binlog'] = (node['percona']['server']['role'] == 'cluster' ? 0 : 1) @@ -191,6 +191,7 @@ default['percona']['server']['replication']['skip_slave_start'] = false default['percona']['server']['replication']['replication_sql'] = '/etc/mysql/replication.sql' default['percona']['server']['replication']['slave_transaction_retries'] = 10 +default['percona']['server']['replication']['slave_exec_mode'] = 'IDEMPOTENT' # Mysqld_safe default['percona']['server']['skip_syslog'] = false diff --git a/metadata.rb b/metadata.rb index d8640d18..c2f54f30 100644 --- a/metadata.rb +++ b/metadata.rb @@ -5,7 +5,7 @@ description 'Installs Percona MySQL client and server' source_url 'https://github.com/hostinger/chef-percona' issues_url 'https://github.com/hostinger/chef-percona/issues' -version '5.11.22' +version '5.11.23' chef_version '>= 16.0' depends 'yum' diff --git a/templates/my.cnf.cluster.erb b/templates/my.cnf.cluster.erb index 2f41bce7..677f0f0d 100644 --- a/templates/my.cnf.cluster.erb +++ b/templates/my.cnf.cluster.erb @@ -241,17 +241,10 @@ sql-mode = <%= node["percona"]["server"]["sql_modes"].join(",") %> # mysqld_safe section <%- if node["percona"]["version"].to_f >= 5.6 %> table_open_cache = <%= node["percona"]["server"]["table_cache"] %> -table_definition_cache = <%= node["percona"]["server"]["table_definition_cache"] %> <%- else %> -table_open_cache = <%= node["percona"]["server"]["table_cache"] %> - <%- unless node["percona"]["server"]["table_definition_cache"].to_i.eql?(-1) %> - <%# for <= 5.6.7, keep in mind MIN/MAX values. The -1 is the default value %> -table_definition_cache = <%= node["percona"]["server"]["table_definition_cache"] %> - <%- end %> +table_cache = <%= node["percona"]["server"]["table_cache"] %> <%- end %> -table_definition_cache = <%= node["percona"]["server"]["table_definition_cache"] %> - #thread_concurrency = 10 <%- if node["percona"]["version"].to_i < 8 %> # @@ -345,6 +338,8 @@ read_only skip-slave-start <% end %> +slave_exec_mode = <%= node["percona"]["server"]["replication"]["slave_exec_mode"] %> + # Number of times the replica SQL thread will retry a transaction in case it # failed with a deadlock or elapsed lock wait timeout, before giving up and # stopping. diff --git a/templates/my.cnf.main.erb b/templates/my.cnf.main.erb index 23a19d5a..2175a89e 100644 --- a/templates/my.cnf.main.erb +++ b/templates/my.cnf.main.erb @@ -102,8 +102,9 @@ performance_schema=<%= node["percona"]["server"]["performance_schema"] ? "ON" : # * Fine Tuning # - +<% if node["percona"]["server"]["sysdate_is_now"] %> sysdate_is_now = <%= node["percona"]["server"]["sysdate_is_now"] %> +<% end %> key_buffer_size = <%= node["percona"]["server"]["key_buffer_size"] %> @@ -220,13 +221,8 @@ sql-mode = <%= node["percona"]["server"]["sql_modes"].join(",") %> # mysqld_safe section <%- if node["percona"]["version"].to_f >= 5.6 %> table_open_cache = <%= node["percona"]["server"]["table_cache"] %> -table_definition_cache = <%= node["percona"]["server"]["table_definition_cache"] %> <%- else %> table_cache = <%= node["percona"]["server"]["table_cache"] %> -<%# for <= 5.6.7, keep in mind MIN/MAX values. The -1 is the default value %> - <%- unless node["percona"]["server"]["table_definition_cache"].to_i.eql?(-1) %> -table_definition_cache = <%= node["percona"]["server"]["table_definition_cache"] %> - <%- end %> <%- end %> #thread_concurrency = 10