Springle has submitted this change and it was merged.
Change subject: phabricator using mysql fulltext T89274, tweaked for
mariadb/aria
......................................................................
phabricator using mysql fulltext T89274, tweaked for mariadb/aria
Change-Id: I133948e0c9bfe2625b39e3d92a2dee68368aa721
---
M manifests/role/mariadb.pp
A templates/mariadb/phabricator-init.sql.erb
A templates/mariadb/phabricator-stopwords.txt.erb
A templates/mariadb/phabricator.my.cnf.erb
4 files changed, 148 insertions(+), 1 deletion(-)
Approvals:
Rush: Looks good to me, approved
jenkins-bot: Verified
diff --git a/manifests/role/mariadb.pp b/manifests/role/mariadb.pp
index 6076cec..07fbe44 100644
--- a/manifests/role/mariadb.pp
+++ b/manifests/role/mariadb.pp
@@ -102,7 +102,7 @@
class { 'mariadb::config':
prompt => "MISC ${shard}",
- config => 'mariadb/misc.my.cnf.erb',
+ config => 'mariadb/phabricator.my.cnf.erb',
password => $passwords::misc::scripts::mysql_root_pass,
datadir => '/a/sqldata',
tmpdir => '/a/tmp',
@@ -110,6 +110,22 @@
read_only => $read_only,
}
+ file { '/etc/mysql/phabricator-init.sql':
+ ensure => present,
+ owner => 'mysql',
+ group => 'mysql',
+ mode => '0644',
+ content => template('mariadb/phabricator-init.sql.erb'),
+ }
+
+ file { '/etc/mysql/phabricator-stopwords.txt':
+ ensure => present,
+ owner => 'mysql',
+ group => 'mysql',
+ mode => '0644',
+ content => template('mariadb/phabricator-stopwords.txt.erb'),
+ }
+
if $snapshot {
include coredb_mysql::snapshot
}
diff --git a/templates/mariadb/phabricator-init.sql.erb
b/templates/mariadb/phabricator-init.sql.erb
new file mode 100644
index 0000000..7e19fe8
--- /dev/null
+++ b/templates/mariadb/phabricator-init.sql.erb
@@ -0,0 +1 @@
+set global ft_boolean_syntax = ' |-><()~*:""&^';
\ No newline at end of file
diff --git a/templates/mariadb/phabricator-stopwords.txt.erb
b/templates/mariadb/phabricator-stopwords.txt.erb
new file mode 100644
index 0000000..c2a09ac
--- /dev/null
+++ b/templates/mariadb/phabricator-stopwords.txt.erb
@@ -0,0 +1,50 @@
+the
+be
+and
+of
+a
+in
+to
+have
+to
+it
+I
+that
+for
+you
+he
+with
+on
+do
+say
+this
+they
+at
+but
+we
+his
+from
+that
+not
+by
+or
+as
+what
+go
+their
+can
+who
+get
+if
+would
+all
+my
+will
+as
+up
+there
+so
+its
+us
+in
+on
\ No newline at end of file
diff --git a/templates/mariadb/phabricator.my.cnf.erb
b/templates/mariadb/phabricator.my.cnf.erb
new file mode 100644
index 0000000..b6c5845
--- /dev/null
+++ b/templates/mariadb/phabricator.my.cnf.erb
@@ -0,0 +1,80 @@
+# Phabricator cluster (shards m3)
+
+[client]
+port = 3306
+socket = /tmp/mysql.sock
+
+[mysqld]
+
+user = mysql
+socket = /tmp/mysql.sock
+port = 3306
+extra_port = 3307
+datadir = <%= @datadir %>
+tmpdir = <%= @tmpdir %>
+server_id = <%= @server_id %>
+sql-mode = <%= @sql_mode %>
+read_only = <%= @read_only %>
+
+log_bin
+log_slave_updates
+skip-external-locking
+skip-name-resolve
+temp-pool
+
+max_connections = 500
+extra_max_connections = 10
+max_connect_errors = 1000000000
+max_allowed_packet = 16M
+connect_timeout = 3
+query_cache_size = 0
+query_cache_type = 0
+event_scheduler = 1
+userstat = 1
+log-warnings = 0
+thread_stack = 192K
+thread_cache_size = 100
+interactive_timeout = 28800
+wait_timeout = 3600
+
+sync_binlog = 1
+binlog_cache_size = 1M
+max_binlog_size = 1000M
+binlog_format = MIXED
+expire_logs_days = 7
+slave_transaction_retries = 4294967295
+
+table_open_cache = 5000
+table_definition_cache = 4000
+character_set_server = binary
+character_set_filesystem = binary
+collation_server = binary
+
+default-storage-engine = InnoDB
+innodb_file_per_table = 1
+innodb_buffer_pool_size = <%= (Float(@memorysize.split[0]) * 0.5).round
%>G
+innodb_buffer_pool_instances = 1
+innodb_log_file_size = 1G
+innodb_flush_log_at_trx_commit = 1
+innodb_flush_method = O_DIRECT
+innodb_thread_concurrency = 0
+innodb_io_capacity = 1000
+innodb_read_io_threads = 16
+innodb_write_io_threads = 8
+innodb_stats_sample_pages = 16
+innodb_stats_method = nulls_unequal
+innodb_locks_unsafe_for_binlog = 1
+
+# T89274 and https://secure.phabricator.com/T6747 and
http://bugs.mysql.com/bug.php?id=13913
+# Setting ft_boolean_syntax with a leading white space explodes and it isn't
clear there was
+# ever a way to escape things or use set-variable here. For now, run a SET
GLOBAL at startup:
+init_file = /etc/mysql/phabricator-init.sql
+ft_min_word_len = 3
+aria_pagecache_buffer_size = 4G
+
+[mysqldump]
+
+quick
+max_allowed_packet = 16M
+
+#!includedir /etc/mysql/conf.d/
\ No newline at end of file
--
To view, visit https://gerrit.wikimedia.org/r/190775
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: merged
Gerrit-Change-Id: I133948e0c9bfe2625b39e3d92a2dee68368aa721
Gerrit-PatchSet: 5
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Springle <[email protected]>
Gerrit-Reviewer: Rush <[email protected]>
Gerrit-Reviewer: Springle <[email protected]>
Gerrit-Reviewer: jenkins-bot <>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits