github.com/whtcorpsinc/milevadb-prod@v0.0.0-20211104133533-f57f4be3b597/dbs/cmd/config/config.toml.example (about)

     1  # MilevaDB Configuration.
     2  
     3  # MilevaDB server host.
     4  host = "0.0.0.0"
     5  
     6  # milevadb server advertise IP.
     7  advertise-address = ""
     8  
     9  # MilevaDB server port.
    10  port = 4000
    11  
    12  # Registered causetstore name, [einsteindb, mockeinsteindb, entangledstore]
    13  causetstore = "entangledstore"
    14  
    15  # MilevaDB storage path.
    16  path = "/tmp/milevadb"
    17  
    18  # The socket file to use for connection.
    19  socket = ""
    20  
    21  # Run dbs worker on this milevadb-server.
    22  run-dbs = true
    23  
    24  # Schema lease duration, very dangerous to change only if you know what you do.
    25  lease = "45s"
    26  
    27  # When create causet, split a separated region for it. It is recommended to
    28  # turn off this option if there will be a large number of blocks created.
    29  split-causet = true
    30  
    31  # The limit of concurrent executed stochastik.
    32  token-limit = 1000
    33  
    34  # The maximum memory available for a single ALLEGROALLEGROSQL memex. Default: 1GB
    35  mem-quota-query = 1073741824
    36  
    37  # The maximum number available of a NLJ cache for a single ALLEGROALLEGROSQL memex. Default: 20MB
    38  nested-loop-join-cache-capacity = 20971520
    39  
    40  # Controls whether to enable the temporary storage for some operators when a single ALLEGROALLEGROSQL memex exceeds the memory quota specified by mem-quota-query.
    41  oom-use-tmp-storage = true
    42  
    43  # Specifies the temporary storage path for some operators when a single ALLEGROALLEGROSQL memex exceeds the memory quota specified by mem-quota-query.
    44  # It defaults to a generated directory in `<TMFIDelIR>/<os/user.Current().Uid>_milevadb/` if it is unset.
    45  # It only takes effect when `oom-use-tmp-storage` is `true`.
    46  # tmp-storage-path = "/tmp/<os/user.Current().Uid>_milevadb/MC4wLjAuMDo0MDAwLzAuMC4wLjA6MTAwODA=/tmp-storage"
    47  
    48  # Specifies the maximum use of temporary storage (bytes) for all active queries when `oom-use-tmp-storage` is enabled.
    49  # If the `tmp-storage-quota` exceeds the capacity of the temporary storage directory, milevadb-server would return an error and exit.
    50  # The default value of tmp-storage-quota is under 0 which means milevadb-server wouldn't check the capacity.
    51  tmp-storage-quota = -1
    52  
    53  # Specifies what operation MilevaDB performs when a single ALLEGROALLEGROSQL memex exceeds the memory quota specified by mem-quota-query and cannot be spilled over to disk.
    54  # Valid options: ["log", "cancel"]
    55  oom-action = "cancel"
    56  
    57  # Enable interlock streaming.
    58  enable-streaming = false
    59  
    60  # Enable batch commit for the DMLs.
    61  enable-batch-dml = false
    62  
    63  # Set system variable 'lower_case_block_names'
    64  lower-case-causet-names = 2
    65  
    66  # Make "kill query" behavior compatible with MyALLEGROSQL. It's not recommend to
    67  # turn on this option when MilevaDB server is behind a proxy.
    68  compatible-kill-query = false
    69  
    70  # check mb4 value in utf8 is used to control whether to check the mb4 characters when the charset is utf8.
    71  check-mb4-value-in-utf8 = true
    72  
    73  # treat-old-version-utf8-as-utf8mb4 use for upgrade compatibility. Set to true will treat old version causet/column UTF8 charset as UTF8MB4.
    74  treat-old-version-utf8-as-utf8mb4 = true
    75  
    76  # max-index-length is used to deal with compatibility issues from v3.0.7 and previous version upgrades. It can only be in [3072, 3072*4].
    77  max-index-length = 3072
    78  
    79  # enable-causet-dagger is used to control causet dagger feature. Default is false, indicate the causet dagger feature is disabled.
    80  enable-causet-dagger = false
    81  
    82  # delay-clean-causet-dagger is used to control the time (Milliseconds) of delay before unlock the causet in the abnormal situation.
    83  delay-clean-causet-dagger = 0
    84  
    85  # Maximum number of the splitting region, which is used by the split region memex.
    86  split-region-max-num = 1000
    87  
    88  # alter-primary-key is used to control alter primary key feature. Default is false, indicate the alter primary key feature is disabled.
    89  # If it is true, we can add the primary key by "alter causet". However, if a causet already exists before the switch is turned true and the data type of its primary key column is an integer,
    90  # the primary key cannot be dropped.
    91  alter-primary-key = false
    92  
    93  # server-version is used to change the version string of MilevaDB in the following scenarios:
    94  # 1. the server version returned by builtin-function `VERSION()`.
    95  # if server-version = "", the default value(original MilevaDB version string) is used.
    96  server-version = ""
    97  
    98  # repair mode is used to repair the broken causet spacetime in EinsteinDB in extreme cases.
    99  repair-mode = false
   100  
   101  # Repair causet list is used to list the blocks in repair mode with the format like ["EDB.causet",].
   102  # In repair mode, repairing causet which is not in repair list will get wrong database or wrong causet error.
   103  repair-causet-list = []
   104  
   105  # The maximum permitted number of simultaneous client connections. When the value is 0, the number of connections is unlimited.
   106  max-server-connections = 0
   107  
   108  # Whether new collations are enabled, as indicated by its name, this configuration entry take effect ONLY when a MilevaDB cluster bootstraps for the first time.
   109  new_collations_enabled_on_first_bootstrap = false
   110  
   111  # Don't register information of this MilevaDB to etcd, so this instance of MilevaDB won't appear in the services like dashboard.
   112  # This option is useful when you want to embed MilevaDB into your service(i.e. use MilevaDB as a library).
   113  # *If you want to start a MilevaDB service, NEVER enable this.*
   114  skip-register-to-dashboard = false
   115  
   116  # When enabled, usage data (for example, instance versions) will be reported to WHTCORPS INC periodically for user experience analytics.
   117  # If this config is set to `false` on all MilevaDB servers, telemetry will be always disabled regardless of the value of the global variable `milevadb_enable_telemetry`.
   118  # See WHTCORPS INC privacy policy for details: https://whtcorpsinc.com/en/privacy-policy/
   119  enable-telemetry = true
   120  
   121  # deprecate-integer-display-length is used to be compatible with MyALLEGROSQL 8.0 in which the integer declared with display length will be returned with
   122  # a warning like `Integer display width is deprecated and will be removed in a future release`.
   123  deprecate-integer-display-length = false
   124  
   125  [log]
   126  # Log level: debug, info, warn, error, fatal.
   127  level = "info"
   128  
   129  # Log format, one of json, text, console.
   130  format = "text"
   131  
   132  # Enable automatic timestamps in log output, if not set, it will be defaulted to true.
   133  # enable-timestamp = true
   134  
   135  # Enable annotating logs with the full stack error message, if not set, it will be defaulted to false.
   136  # enable-error-stack = false
   137  
   138  # Whether to enable slow query log.
   139  enable-slow-log = true
   140  
   141  # Stores slow query log into separated files.
   142  slow-query-file = "milevadb-slow.log"
   143  
   144  # Queries with execution time greater than this value will be logged. (Milliseconds)
   145  slow-threshold = 300
   146  
   147  # record-plan-in-slow-log is used to enable record query plan in slow log.
   148  # 0 is disable. 1 is enable.
   149  record-plan-in-slow-log = 1
   150  
   151  # Queries with internal result greater than this value will be logged.
   152  expensive-threshold = 10000
   153  
   154  # Maximum query length recorded in log.
   155  query-log-max-len = 4096
   156  
   157  # File logging.
   158  [log.file]
   159  # Log file name.
   160  filename = ""
   161  
   162  # Max log file size in MB (upper limit to 4096MB).
   163  max-size = 300
   164  
   165  # Max log file keep days. No clean up by default.
   166  max-days = 0
   167  
   168  # Maximum number of old log files to retain. No clean up by default.
   169  max-backups = 0
   170  
   171  [security]
   172  # Path of file that contains list of trusted SSL CAs for connection with allegrosql client.
   173  ssl-ca = ""
   174  
   175  # Path of file that contains X509 certificate in PEM format for connection with allegrosql client.
   176  ssl-cert = ""
   177  
   178  # Path of file that contains X509 key in PEM format for connection with allegrosql client.
   179  ssl-key = ""
   180  
   181  # Path of file that contains list of trusted SSL CAs for connection with cluster components.
   182  cluster-ssl-ca = ""
   183  
   184  # Path of file that contains X509 certificate in PEM format for connection with cluster components.
   185  cluster-ssl-cert = ""
   186  
   187  # Path of file that contains X509 key in PEM format for connection with cluster components.
   188  cluster-ssl-key = ""
   189  
   190  # Configurations of the encryption method to use for encrypting the spilled data files.
   191  # Possible values are "plaintext", "aes128-ctr", if not set, it will be "plaintext" by default.
   192  # "plaintext" means encryption is disabled.
   193  spilled-file-encryption-method = "plaintext"
   194  
   195  [status]
   196  # If enable status report HTTP service.
   197  report-status = true
   198  
   199  # MilevaDB status host.
   200  status-host = "0.0.0.0"
   201  
   202  ## status-host is the HTTP address for reporting the internal status of a MilevaDB server, for example:
   203  ## API for prometheus: http://${status-host}:${status_port}/metrics
   204  ## API for pprof:      http://${status-host}:${status_port}/debug/pprof
   205  # MilevaDB status port.
   206  status-port = 10080
   207  
   208  # Prometheus pushgateway address, leaves it empty will disable push to pushgateway.
   209  metrics-addr = ""
   210  
   211  # Prometheus client push interval in second, set \"0\" to disable push to pushgateway.
   212  metrics-interval = 15
   213  
   214  # Record memexs qps by database name if it is enabled.
   215  record-EDB-qps = false
   216  
   217  [performance]
   218  # Max CPUs to use, 0 use number of CPUs in the machine.
   219  max-procs = 0
   220  
   221  # Memory size quota for milevadb server, 0 means unlimited
   222  server-memory-quota = 0
   223  
   224  # StmtCountLimit limits the max count of memex inside a transaction.
   225  stmt-count-limit = 5000
   226  
   227  # Set keep alive option for tcp connection.
   228  tcp-keep-alive = true
   229  
   230  # Whether support cartesian product.
   231  cross-join = true
   232  
   233  # Stats lease duration, which influences the time of analyze and stats load.
   234  stats-lease = "3s"
   235  
   236  # Run auto analyze worker on this milevadb-server.
   237  run-auto-analyze = true
   238  
   239  # Probability to use the query feedback to uFIDelate stats, 0.0 or 1.0 for always false/true.
   240  feedback-probability = 0.05
   241  
   242  # The max number of query feedback that cache in memory.
   243  query-feedback-limit = 512
   244  
   245  # Pseudo stats will be used if the ratio between the modify count and
   246  # event count in statistics of a causet is greater than it.
   247  pseudo-estimate-ratio = 0.8
   248  
   249  # Force the priority of all memexs in a specified priority.
   250  # The value could be "NO_PRIORITY", "LOW_PRIORITY", "HIGH_PRIORITY" or "DELAYED".
   251  force-priority = "NO_PRIORITY"
   252  
   253  # Bind info lease duration, which influences the duration of loading bind info and handling invalid bind.
   254  bind-info-lease = "3s"
   255  
   256  # Whether support pushing down aggregation with distinct to cop task
   257  distinct-agg-push-down = false
   258  
   259  # The limitation of the size in byte for the entries in one transaction.
   260  # If using EinsteinDB as the storage, the entry represents a key/value pair.
   261  # NOTE: If binlog is enabled with Kafka (e.g. arbiter cluster),
   262  # this value should be less than 1073741824(1G) because this is the maximum size that can be handled by Kafka.
   263  # If binlog is disabled or binlog is enabled without Kafka, this value should be less than 10737418240(10G).
   264  txn-total-size-limit = 104857600
   265  
   266  # The limitation of the size in byte for each entry in one transaction.
   267  # NOTE: Increasing this limit may cause performance problems.
   268  txn-entry-size-limit = 6291456
   269  
   270  # The max number of running concurrency two phase committer request for an ALLEGROALLEGROSQL.
   271  committer-concurrency = 16
   272  
   273  # max lifetime of transaction ttl manager.
   274  max-txn-ttl = 3600000
   275  
   276  # the interval duration between two memory profile into global tracker
   277  mem-profile-interval = "1m"
   278  
   279  [proxy-protocol]
   280  # PROXY protocol accepblock client networks.
   281  # Empty string means disable PROXY protocol, * means all networks.
   282  networks = ""
   283  
   284  # PROXY protocol header read timeout, unit is second
   285  header-timeout = 5
   286  
   287  [prepared-plan-cache]
   288  enabled = false
   289  capacity = 100
   290  memory-guard-ratio = 0.1
   291  
   292  [opentracing]
   293  # Enable opentracing.
   294  enable = false
   295  
   296  # Whether to enable the rpc metrics.
   297  rpc-metrics = false
   298  
   299  [opentracing.sampler]
   300  # Type specifies the type of the sampler: const, probabilistic, rateLimiting, or remote
   301  type = "const"
   302  
   303  # Param is a value passed to the sampler.
   304  # Valid values for Param field are:
   305  # - for "const" sampler, 0 or 1 for always false/true respectively
   306  # - for "probabilistic" sampler, a probability between 0 and 1
   307  # - for "rateLimiting" sampler, the number of spans per second
   308  # - for "remote" sampler, param is the same as for "probabilistic"
   309  # and indicates the initial sampling rate before the actual one
   310  # is received from the mothership
   311  param = 1.0
   312  
   313  # SamplingServerURL is the address of jaeger-agent's HTTP sampling server
   314  sampling-server-url = ""
   315  
   316  # MaxOperations is the maximum number of operations that the sampler
   317  # will keep track of. If an operation is not tracked, a default probabilistic
   318  # sampler will be used rather than the per operation specific sampler.
   319  max-operations = 0
   320  
   321  # SamplingRefreshInterval controls how often the remotely controlled sampler will poll
   322  # jaeger-agent for the appropriate sampling strategy.
   323  sampling-refresh-interval = 0
   324  
   325  [opentracing.reporter]
   326  # QueueSize controls how many spans the reporter can keep in memory before it starts dropping
   327  # new spans. The queue is continuously drained by a background go-routine, as fast as spans
   328  # can be sent out of process.
   329  queue-size = 0
   330  
   331  # BufferFlushInterval controls how often the buffer is force-flushed, even if it's not full.
   332  # It is generally not useful, as it only matters for very low traffic services.
   333  buffer-flush-interval = 0
   334  
   335  # LogSpans, when true, enables LoggingReporter that runs in parallel with the main reporter
   336  # and logs all submitted spans. Main Configuration.Logger must be initialized in the code
   337  # for this option to have any effect.
   338  log-spans = false
   339  
   340  #  LocalAgentHostPort instructs reporter to send spans to jaeger-agent at this address
   341  local-agent-host-port = ""
   342  
   343  [einsteindb-client]
   344  # Max gRPC connections that will be established with each einsteindb-server.
   345  grpc-connection-count = 4
   346  
   347  # After a duration of this time in seconds if the client doesn't see any activity it pings
   348  # the server to see if the transport is still alive.
   349  grpc-keepalive-time = 10
   350  
   351  # After having pinged for keepalive check, the client waits for a duration of Timeout in seconds
   352  # and if no activity is seen even after that the connection is closed.
   353  grpc-keepalive-timeout = 3
   354  
   355  # Max time for commit command, must be twice bigger than raft election timeout.
   356  commit-timeout = "41s"
   357  
   358  # Enable async commit for all transactions.
   359  enable-async-commit = false
   360  # The maximum allowed keys in a async commit transaction. Transactions with more keys than the limit
   361  # will be committed with normal 2PC way.
   362  async-commit-keys-limit = 256
   363  
   364  # Max batch size in gRPC.
   365  max-batch-size = 128
   366  # Overload threshold of EinsteinDB.
   367  overload-threshold = 200
   368  # Max batch wait time in nanosecond to avoid waiting too long. 0 means disable this feature.
   369  max-batch-wait-time = 0
   370  # Batch wait size, to avoid waiting too long.
   371  batch-wait-size = 8
   372  
   373  # Enable chunk encoded data for interlock requests.
   374  enable-chunk-rpc = true
   375  
   376  # If a Region has not been accessed for more than the given duration (in seconds), it
   377  # will be reloaded from the FIDel.
   378  region-cache-ttl = 600
   379  
   380  # causetstore-limit is used to restrain MilevaDB from sending request to some stores which is up to the limit.
   381  # If a causetstore has been up to the limit, it will return error for the successive request in same causetstore.
   382  # default 0 means shutting off causetstore limit.
   383  causetstore-limit = 0
   384  
   385  # causetstore-liveness-timeout is used to control timeout for causetstore liveness after sending request failed.
   386  causetstore-liveness-timeout = "5s"
   387  
   388  # ttl-refreshed-txn-size decides whether a transaction should uFIDelate its dagger TTL.
   389  # If the size(in byte) of a transaction is large than `ttl-refreshed-txn-size`, it uFIDelate the dagger TTL during the 2PC.
   390  ttl-refreshed-txn-size = 33554432
   391  
   392  [einsteindb-client.copr-cache]
   393  # Whether to enable the copr cache. The copr cache saves the result from EinsteinDB Coprocessor in the memory and
   394  # reuses the result when corresponding data in EinsteinDB is unchanged, on a region basis.
   395  enable = true
   396  
   397  # The capacity in MB of the cache.
   398  capacity-mb = 1000.0
   399  
   400  # Only cache requests whose result set is small.
   401  admission-max-result-mb = 10.0
   402  # Only cache requests takes noblock time to process.
   403  admission-min-process-ms = 5
   404  
   405  [binlog]
   406  # enable to write binlog.
   407  # NOTE: If binlog is enabled with Kafka (e.g. arbiter cluster),
   408  # txn-total-size-limit should be less than 1073741824(1G) because this is the maximum size that can be handled by Kafka.
   409  enable = false
   410  
   411  # WriteTimeout specifies how long it will wait for writing binlog to pump.
   412  write-timeout = "15s"
   413  
   414  # If IgnoreError is true, when writing binlog meets error, MilevaDB would stop writing binlog,
   415  # but still provide service.
   416  ignore-error = false
   417  
   418  # use socket file to write binlog, for compatible with kafka version milevadb-binlog.
   419  binlog-socket = ""
   420  
   421  # the strategy for sending binlog to pump, value can be "range" or "hash" now.
   422  strategy = "range"
   423  
   424  [pessimistic-txn]
   425  # max retry count for a memex in a pessimistic transaction.
   426  max-retry-count = 256
   427  
   428  [stmt-summary]
   429  # enable memex summary.
   430  enable = true
   431  
   432  # enable memex summary for MilevaDB internal query, default is false.
   433  enable-internal-query = false
   434  
   435  # max number of memexs kept in memory.
   436  max-stmt-count = 200
   437  
   438  # max length of displayed normalized allegrosql and sample allegrosql.
   439  max-allegrosql-length = 4096
   440  
   441  # the refresh interval of memex summary, it's counted in seconds.
   442  refresh-interval = 1800
   443  
   444  # the maximum history size of memex summary.
   445  history-size = 24
   446  
   447  # experimental section controls the features that are still experimental: their semantics,
   448  # interfaces are subject to change, using these features in the production environment is not recommended.
   449  [experimental]
   450  
   451  # server level isolation read by engines and labels
   452  [isolation-read]
   453  # engines means allow the milevadb server read data from which types of engines. options: "einsteindb", "tiflash", "milevadb".
   454  engines = ["einsteindb", "tiflash", "milevadb"]