Skip to content

Commit

Permalink
Merge pull request #35 from mcrauwel/change_transaction_persistent_de…
Browse files Browse the repository at this point in the history
…fault

Change transaction persistent default
  • Loading branch information
bastelfreak authored Nov 17, 2017
2 parents 1526223 + c0ff92b commit 2a6b975
Show file tree
Hide file tree
Showing 5 changed files with 1 addition and 20 deletions.
2 changes: 1 addition & 1 deletion lib/puppet/provider/proxy_mysql_user/proxysql.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ def create
default_hostgroup = @resource.value(:default_hostgroup) || 0
default_schema = @resource.value(:default_schema) || ''
schema_locked = @resource.value(:schema_locked) || 0
transaction_persistent = @resource.value(:transaction_persistent) || 0
transaction_persistent = @resource.value(:transaction_persistent) || 1
fast_forward = @resource.value(:fast_forward) || 0
backend = @resource.value(:backend) || 1
frontend = @resource.value(:frontend) || 1
Expand Down
4 changes: 0 additions & 4 deletions lib/puppet/type/proxy_mysql_query_rule.rb
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@

newproperty(:active) do
desc 'Is the rule active or not.'
defaultto 0
newvalue(%r{[01]})
end

Expand All @@ -51,7 +50,6 @@

newproperty(:flag_in) do
desc 'Used to chain rules. This is the id of the previous rule to apply'
defaultto 0
newvalue(%r{\d+})
end

Expand All @@ -62,7 +60,6 @@

newproperty(:apply) do
desc 'Used to chain rules.'
defaultto 0
newvalue(%r{[01]})
end

Expand Down Expand Up @@ -103,7 +100,6 @@

newproperty(:negate_match_pattern) do
desc 'if this is set to 1, only queries not matching the query text will be considered as a match. This acts as a NOT operator in front of the regular expression matching against match_pattern or match_digest.'
defaultto 0
newvalue(%r{[01]})
end

Expand Down
6 changes: 0 additions & 6 deletions lib/puppet/type/proxy_mysql_server.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,37 +56,31 @@

newproperty(:weight) do
desc 'the bigger the weight of a server relative to other weights, the higher the probability of the server to be chosen from a hostgroup'
defaultto 1
newvalue(%r{\d+})
end

newproperty(:compression) do
desc 'if the value is greater than 0, new connections to that server will use compression'
defaultto 0
newvalue(%r{\d+})
end

newproperty(:max_connections) do
desc 'the maximum number of connections ProxySQL will open to this backend server. Even though this server will have the highest weight, no new connections will be opened to it once this limit is hit. Please ensure that the backend is configured with a correct value of max_connections to avoid that ProxySQL will try to go beyond that limit'
defaultto 1000
newvalue(%r{\d+})
end

newproperty(:max_replication_lag) do
desc 'if greater and 0, ProxySQL will reguarly monitor replication lag and if it goes beyond such threshold it will temporary shun the host until replication catch ups'
defaultto 0
newvalue(%r{\d+})
end

newproperty(:use_ssl) do
desc 'if set to 1, connections to the backend will use SSL'
defaultto 0
newvalue(%r{[01]})
end

newproperty(:max_latency_ms) do
desc 'ping time is regularly monitored. If a host has a ping time greater than max_latency_ms it is excluded from the connection pool (although the server stays ONLINE)'
defaultto 0
newvalue(%r{[\d+]})
end

Expand Down
7 changes: 0 additions & 7 deletions lib/puppet/type/proxy_mysql_user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,19 +45,16 @@ def initialize(*args)

newproperty(:active) do
desc 'Is the user active or not.'
defaultto 1
newvalue(%r{[01]})
end

newproperty(:use_ssl) do
desc 'Use ssl or not.'
defaultto 0
newvalue(%r{[01]})
end

newproperty(:default_hostgroup) do
desc 'Default hostgroup for the user.'
defaultto 0
newvalue(%r{\d+})
end

Expand All @@ -68,19 +65,16 @@ def initialize(*args)

newproperty(:schema_locked) do
desc 'Is the user locked in the default schema or not.'
defaultto 0
newvalue(%r{[01]})
end

newproperty(:transaction_persistent) do
desc 'Disable routing across hostgroups once a transaction has started for a specific user.'
defaultto 0
newvalue(%r{[01]})
end

newproperty(:fast_forward) do
desc 'Use fast forwrd or not.'
defaultto 0
newvalue(%r{[01]})
end

Expand All @@ -98,7 +92,6 @@ def initialize(*args)

newproperty(:max_connections) do
desc 'Max concurrent connections for the user.'
defaultto 10_000
newvalue(%r{\d+})
end
end
2 changes: 0 additions & 2 deletions lib/puppet/type/proxy_scheduler.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,11 @@

newproperty(:active) do
desc 'Is the scheduler active or not.'
defaultto 1
newvalue(%r{[01]})
end

newproperty(:interval_ms) do
desc 'How often (in millisecond) the job will be started.'
defaultto 10_000
newvalue(%r{\d+})
end

Expand Down

0 comments on commit 2a6b975

Please sign in to comment.