Skip to content

Commit

Permalink
Merge pull request #25 from hostinger/fix/update_values
Browse files Browse the repository at this point in the history
Update some values to match before sync
  • Loading branch information
PovilasV1 authored Nov 6, 2023
2 parents 71c5db7 + 68ead1a commit aa26c1a
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 17 deletions.
5 changes: 3 additions & 2 deletions attributes/default.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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)
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion metadata.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
11 changes: 3 additions & 8 deletions templates/my.cnf.cluster.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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 %>
#
Expand Down Expand Up @@ -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.
Expand Down
8 changes: 2 additions & 6 deletions templates/my.cnf.main.erb
Original file line number Diff line number Diff line change
Expand Up @@ -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"] %>

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit aa26c1a

Please sign in to comment.