Skip to content

Commit

Permalink
bump TiDB to v2.1.0 (pingcap#212)
Browse files Browse the repository at this point in the history
* bump TiDB to v2.1.0
  • Loading branch information
tennix authored and weekface committed Dec 7, 2018
1 parent 39027af commit 7da4bd2
Show file tree
Hide file tree
Showing 9 changed files with 152 additions and 73 deletions.
31 changes: 25 additions & 6 deletions charts/tidb-cluster/templates/config/_drainer-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pd-urls = "http://{{ .Values.clusterName }}-pd:2379"
[syncer]

# disable sync these schema
ignore-schemas = "{{ .Values.binlog.drainer.ignoreSchemas | default "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql,test" }}"
ignore-schemas = {{ .Values.binlog.drainer.ignoreSchemas | default "INFORMATION_SCHEMA,PERFORMANCE_SCHEMA,mysql" | quote }}

# number of binlog events in a transaction batch
txn-batch = {{ .Values.binlog.drainer.txnBatch | default 1 }}
Expand Down Expand Up @@ -54,6 +54,20 @@ db-type = "{{ .Values.binlog.drainer.destDBType }}"
#db-name ="test"
#tbl-name = "~^a.*"

{{- if eq .Values.binlog.drainer.destDBType "mysql" }}
# the downstream mysql protocol database
[syncer.to]
host = {{ .Values.binlog.drainer.mysql.host | quote }}
user = {{ .Values.binlog.drainer.mysql.user | default "root" | quote }}
password = {{ .Values.binlog.drainer.mysql.password | quote }}
port = {{ .Values.binlog.drainer.mysql.port | default 3306 }}
# Time and size limits for flash batch write
time-limit = {{ .Values.binlog.drainer.mysql.timeLimit | default "30s" | quote }}
size-limit = {{ .Values.binlog.drainer.mysql.sizeLimit | default 100000 | quote }}
[syncer.to.checkpoint]
#schema = "tidb_binlog"
{{- end }}

{{- if eq .Values.binlog.drainer.destDBType "pb" }}
# Uncomment this if you want to use pb or sql as db-type.
# Compress compresses output file, like pb and sql file. Now it supports "gzip" algorithm only.
Expand All @@ -63,16 +77,21 @@ dir = "/data/pb"
compression = "gzip"
{{- end }}


{{- if eq .Values.binlog.drainer.destDBType "kafka" }}
# when db-type is kafka, you can uncomment this to config the down stream kafka, it will be the globle config kafka default
[syncer.to]
# only need config one of zookeeper-addrs and kafka-addrs, will get kafka address if zookeeper-addrs is configed.
{{- if .Values.binlog.drainer.kafka.zookeeperAddrs }}
zookeeper-addrs = {{ .Values.binlog.drainer.kafka.zookeeperAddrs }}
zookeeper-addrs = {{ .Values.binlog.drainer.kafka.zookeeperAddrs | quote }}
{{- end }}
{{- if .Values.binlog.drainer.kafka.kafkaAddrs }}
kafka-addrs = {{ .Values.binlog.drainer.kafka.kafkaAddrs }}
{{- end }}
kafka-version = {{ .Values.binlog.drainer.kafka.kafkaVersion | default "0.8.2.0" }}
kafka-addrs = {{ .Values.binlog.drainer.kafka.kafkaAddrs | quote }}
{{- end }}
kafka-version = {{ .Values.binlog.drainer.kafka.kafkaVersion | default "0.8.2.0" | quote }}
kafka-max-messages = 1024
#
#
# the topic name drainer will push msg, the default name is <cluster-id>_obinlog
# be careful don't use the same name if run multi drainer instances
# topic-name = ""
{{- end -}}
5 changes: 5 additions & 0 deletions charts/tidb-cluster/templates/config/_pd-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ initial-cluster-state = ""
lease = 3
tso-save-interval = "3s"

namespace-classifier = "table"

enable-prevote = true

[security]
# Path of file that contains list of trusted SSL CAs. if set, following four settings shouldn't be empty
cacert-path = ""
Expand Down Expand Up @@ -54,6 +58,7 @@ address = ""

[schedule]
max-merge-region-size = 0
max-merge-region-keys = 0
split-merge-interval = "1h"
max-snapshot-count = 3
max-pending-peer-count = 16
Expand Down
36 changes: 22 additions & 14 deletions charts/tidb-cluster/templates/config/_privileged-tidb-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# TiDB server host.
host = "0.0.0.0"

# tidb server advertise IP.
advertise-address = ""

# TiDB server port.
port = 4000

Expand Down Expand Up @@ -41,9 +44,13 @@ enable-streaming = false
# Set system variable 'lower_case_table_names'
lower-case-table-names = 2

# Make "kill query" behavior compatible with MySQL. It's not recommend to
# turn on this option when TiDB server is behind a proxy.
compatible-kill-query = false

[log]
# Log level: debug, info, warn, error, fatal.
level = "{{ .Values.privilegedTidb.logLevel }}"
level = {{ .Values.privilegedTidb.logLevel | default "info" | quote }}

# Log format, one of json, text, console.
format = "text"
Expand Down Expand Up @@ -123,9 +130,6 @@ stmt-count-limit = 5000
# Set keep alive option for tcp connection.
tcp-keep-alive = true

# The maximum number of retries when commit a transaction.
retry-limit = 10

# Whether support cartesian product.
cross-join = true

Expand All @@ -136,14 +140,18 @@ stats-lease = "3s"
run-auto-analyze = true

# Probability to use the query feedback to update stats, 0 or 1 for always false/true.
feedback-probability = 0.0
feedback-probability = 0.05

# The max number of query feedback that cache in memory.
query-feedback-limit = 1024

# Pseudo stats will be used if the ratio between the modify count and
# row count in statistics of a table is greater than it.
pseudo-estimate-ratio = 0.7
pseudo-estimate-ratio = 0.8

# Force the priority of all statements in a specified priority.
# The value could be "NO_PRIORITY", "LOW_PRIORITY", "HIGH_PRIORITY" or "DELAYED".
force-priority = "NO_PRIORITY"

[proxy-protocol]
# PROXY protocol acceptable client networks.
Expand All @@ -153,11 +161,6 @@ networks = ""
# PROXY protocol header read timeout, unit is second
header-timeout = 5

[plan-cache]
enabled = false
capacity = 2560
shards = 256

[prepared-plan-cache]
enabled = false
capacity = 100
Expand Down Expand Up @@ -228,10 +231,15 @@ grpc-keepalive-timeout = 3
# max time for commit command, must be twice bigger than raft election timeout.
commit-timeout = "41s"

[binlog]
[txn-local-latches]
# Enable local latches for transactions. Enable it when
# there are lots of conflicts between transactions.
enabled = false
capacity = 10240000

# Socket file to write binlog.
binlog-socket = ""
[binlog]
# enable to write binlog.
enable = false

# WriteTimeout specifies how long it will wait for writing binlog to pump.
write-timeout = "15s"
Expand Down
16 changes: 15 additions & 1 deletion charts/tidb-cluster/templates/config/_pump-config.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
addr = "0.0.0.0:8250"

# addr(i.e. 'host:port') to advertise to the public
# advertise-addr = ""
advertise-addr = ""

# a integer value to control expiry date of the binlog data, indicates for how long (in days) the binlog data would be stored.
# must bigger than 0
Expand All @@ -26,3 +26,17 @@ pd-urls = "http://{{ .Values.clusterName }}-pd:2379"
# ssl-cert = "/path/to/drainer.pem"
# Path of file that contains X509 key in PEM format for connection with cluster components.
# ssl-key = "/path/to/drainer-key.pem"
#
#
# we suggest using the default config of the embedded LSM DB now, do not change it unless you know what you are doing
# [storage.kv]
# block-cache-capacity = 8388608
# block-restart-interval = 16
# block-size = 4096
# compaction-L0-trigger = 8
# compaction-table-size = 67108864
# compaction-total-size = 536870912
# compaction-total-size-multiplier = 8
# write-buffer = 67108864
# write-L0-pause-trigger = 24
# write-L0-slowdown-trigger = 17
36 changes: 22 additions & 14 deletions charts/tidb-cluster/templates/config/_tidb-config.tpl
Original file line number Diff line number Diff line change
@@ -1,8 +1,11 @@
#TiDB Configuration.
# TiDB Configuration.

# TiDB server host.
host = "0.0.0.0"

# tidb server advertise IP.
advertise-address = ""

# TiDB server port.
port = 4000

Expand Down Expand Up @@ -41,6 +44,10 @@ enable-streaming = false
# Set system variable 'lower_case_table_names'
lower-case-table-names = 2

# Make "kill query" behavior compatible with MySQL. It's not recommend to
# turn on this option when TiDB server is behind a proxy.
compatible-kill-query = false

[log]
# Log level: debug, info, warn, error, fatal.
level = {{ .Values.tidb.logLevel | default "info" | quote }}
Expand Down Expand Up @@ -121,9 +128,6 @@ stmt-count-limit = 5000
# Set keep alive option for tcp connection.
tcp-keep-alive = true

# The maximum number of retries when commit a transaction.
retry-limit = 10

# Whether support cartesian product.
cross-join = true

Expand All @@ -134,14 +138,18 @@ stats-lease = "3s"
run-auto-analyze = true

# Probability to use the query feedback to update stats, 0 or 1 for always false/true.
feedback-probability = 0.0
feedback-probability = 0.05

# The max number of query feedback that cache in memory.
query-feedback-limit = 1024

# Pseudo stats will be used if the ratio between the modify count and
# row count in statistics of a table is greater than it.
pseudo-estimate-ratio = 0.7
pseudo-estimate-ratio = 0.8

# Force the priority of all statements in a specified priority.
# The value could be "NO_PRIORITY", "LOW_PRIORITY", "HIGH_PRIORITY" or "DELAYED".
force-priority = "NO_PRIORITY"

[proxy-protocol]
# PROXY protocol acceptable client networks.
Expand All @@ -151,11 +159,6 @@ networks = ""
# PROXY protocol header read timeout, unit is second
header-timeout = 5

[plan-cache]
enabled = false
capacity = 2560
shards = 256

[prepared-plan-cache]
enabled = false
capacity = 100
Expand Down Expand Up @@ -226,10 +229,15 @@ grpc-keepalive-timeout = 3
# max time for commit command, must be twice bigger than raft election timeout.
commit-timeout = "41s"

[binlog]
[txn-local-latches]
# Enable local latches for transactions. Enable it when
# there are lots of conflicts between transactions.
enabled = false
capacity = 10240000

# Socket file to write binlog.
binlog-socket = ""
[binlog]
# enable to write binlog.
enable = false

# WriteTimeout specifies how long it will wait for writing binlog to pump.
write-timeout = "15s"
Expand Down
Loading

0 comments on commit 7da4bd2

Please sign in to comment.