Commit b6f2372f authored by Julien Muchembled's avatar Julien Muchembled

ERP5: add support for TokuDB (portal_catalog)

This is the SlapOS part.
ERP5 SQL methods must be changed to not hardcode 'InnoDB'.
parent ce9e0df5
......@@ -85,6 +85,11 @@
"minimum": 0,
"type": "integer"
},
"tokudb-block-size": {
"description": "See MariaDB documentation on tokudb_block_size",
"minimum": 0,
"type": "integer"
},
"long-query-time": {
"description": "Number of seconds above which long queries are logged",
"minimum": 0,
......
......@@ -29,6 +29,7 @@ innodb_locks_unsafe_for_binlog = 1
{{x}}innodb_flush_log_at_trx_commit = 0
{{x}}innodb_flush_method = nosync
{{x}}innodb_doublewrite = 0
{{x}}tokudb_commit_sync = 0
{{x}}sync_frm = 0
# Extra parameters.
......
......@@ -112,7 +112,7 @@ md5sum = 16024af1cde9c0fcc7e8e05ec0854b30
[template-neo-my-cnf]
<= download-base-neo
url = ${:_profile_base_location_}/my.cnf.in
md5sum = 87d18c7021e4d43756813a83c9da5e97
md5sum = c93a426bde63cde9f8dce421120d0bef
[versions]
BTrees = 4.4.1
......
......@@ -26,7 +26,7 @@ md5sum = 1af531c51f575a1d1362f2ca2d61620d
[template-mariadb]
filename = instance-mariadb.cfg.in
md5sum = 488b9410da5f23f9af177f81d847c930
md5sum = a64c095796e7ce66c759987721ab624a
[template-kumofs]
filename = instance-kumofs.cfg.in
......@@ -42,7 +42,7 @@ md5sum = d32417746fcf671d4e86a70379815039
[template-my-cnf]
filename = my.cnf.in
md5sum = d814b984abf2dc444af2a0bc6287e7f5
md5sum = 2616711f01c23be4b872bb587146c365
[template-mariadb-initial-setup]
filename = mariadb_initial_setup.sql.in
......
......@@ -137,6 +137,7 @@ innodb-buffer-pool-size = {{ dumps(slapparameter_dict.get('innodb-buffer-pool-si
innodb-buffer-pool-instances = {{ dumps(slapparameter_dict.get('innodb-buffer-pool-instances', 0)) }}
innodb-log-file-size = {{ dumps(slapparameter_dict.get('innodb-log-file-size', 0)) }}
innodb-log-buffer-size = {{ dumps(slapparameter_dict.get('innodb-log-buffer-size', 0)) }}
tokudb-block-size = {{ dumps(slapparameter_dict.get('tokudb-block-size', 0)) }}
relaxed-writes = {{ dumps(slapparameter_dict.get('relaxed-writes', False)) }}
{% if incremental_backup_retention_days > -1 -%}
binlog-path = ${directory:mariadb-backup-incremental}/binlog
......
......@@ -29,20 +29,23 @@ max_allowed_packet = 128M
query_cache_size = 32M
innodb_file_per_table = 0
plugin_load = ha_mroonga.so;handlersocket.so
plugin_load = ha_mroonga;handlersocket;ha_tokudb
# By default only 100 connections are allowed, when using zeo
# we may have much more connections
max_connections = 1000
{% set innodb_buffer_pool_size = parameter_dict['innodb-buffer-pool-size'] -%}
{% if innodb_buffer_pool_size %}innodb_buffer_pool_size = {{ innodb_buffer_pool_size }}{% endif %}
{% set innodb_buffer_pool_instances = parameter_dict['innodb-buffer-pool-instances'] -%}
{% if innodb_buffer_pool_instances %}innodb_buffer_pool_instances = {{ innodb_buffer_pool_instances }}{% endif %}
{% set innodb_log_file_size = parameter_dict['innodb-log-file-size'] -%}
{% if innodb_log_file_size %} innodb_log_file_size = {{ innodb_log_file_size }}{% endif %}
{% set innodb_log_buffer_size = parameter_dict['innodb-log-buffer-size'] -%}
{% if innodb_log_buffer_size %} innodb_log_buffer_size = {{ innodb_log_buffer_size }}{% endif %}
{% for k in ('innodb-buffer-pool-size',
'innodb-buffer-pool-instances',
'innodb-log-file-size',
'innodb-log-buffer-size',
'tokudb-block-size',
) -%}
{% set v = parameter_dict[k] -%}
{% if v -%}
{{ k.replace('-', '_') }} = {{ v }}
{% endif -%}
{% endfor -%}
# very important to allow parallel indexing
# Note: this is compatible with binlog-based incremental backups, because ERP5
......@@ -63,6 +66,7 @@ server_id = {{ parameter_dict['server-id'] }}
{{x}}innodb_flush_log_at_trx_commit = 0
{{x}}innodb_flush_method = nosync
{{x}}innodb_doublewrite = 0
{{x}}tokudb_commit_sync = 0
{{x}}sync_frm = 0
# Force utf8 usage
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment