{"id":12974,"date":"2019-11-06T08:31:09","date_gmt":"2019-11-06T07:31:09","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/"},"modified":"2019-11-06T08:31:09","modified_gmt":"2019-11-06T07:31:09","slug":"galera-cluster-4-with-mariadb-10-4-8","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/","title":{"rendered":"Galera Cluster 4 with MariaDB 10.4.8"},"content":{"rendered":"<p>Last month, by a new customer I had to install the latest version of the MariaDB server: 10.4.8 to setup a Galera Cluster with 3 master nodes.<br \/>\nThe good news was that this version was shipped with the latest version of the Galera Plugin from Codership: Galera Cluster 4.0.<br \/>\nAs usual, installation &amp; configuration was quitte easy.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">$ sudo yum -y install MariaDB-server\n$ sudo yum list installed|grep -i mariadb\nMariaDB-client.x86_64 10.4.8-1.el7.centos @mariadb-main\nMariaDB-common.x86_64 10.4.8-1.el7.centos @mariadb-main\nMariaDB-compat.x86_64 10.4.8-1.el7.centos @mariadb-main\nMariaDB-server.x86_64 10.4.8-1.el7.centos @mariadb-main\ngalera.x86_64 26.4.2-1.rhel7.el7.centos @mariadb-main<\/pre>\n<h2>New Features:<\/h2>\n<p>But now I just want to introduce some of the new interesting and high level features available in this version.<\/p>\n<h3>Streaming Replication<\/h3>\n<p>In the previous versions, when we had large and long-running write transactions, we had always conflicts during<br \/>\nthe Certification Based Replication and because of this, often transactions were aborted and rolled back.<br \/>\nSome of our customers were really suffering and complaining because of this problem and limitation.<br \/>\nNow, when there will be a big transaction, the node who initiated the transaction will not have to wait till the &#8220;commit&#8221;<br \/>\nbut will break it into fragments, will certify it and will replicate it on the other master nodes while still the transaction will be running.<\/p>\n<h3>New System Tables<\/h3>\n<p>When having a look to the mysql database, we can see 3 new system tables.<br \/>\nThey are containing informations that are already in status variables but now they will be persistent:<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">MariaDB [mysql]&gt; show tables from mysql like 'wsrep_%';\n+---------------------------+\n| Tables_in_mysql (wsrep_%) |\n+---------------------------+\n| wsrep_cluster \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 |\n| wsrep_cluster_members \u00a0 \u00a0 |\n| wsrep_streaming_log. \u00a0 \u00a0\u00a0 |\n+---------------------------+\n3 rows in set (0.000 sec)<\/pre>\n<p>These 3 new tables should bring to the database administrators a better overview of the current status of the cluster.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">MariaDB [mysql]&gt; select * from wsrep_cluster;\n+--------------------------------------+---------+------------+------------------+--------------+\n| cluster_uuid \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0   | view_id | view_seqno | protocol_version | capabilities |\n+--------------------------------------+---------+------------+------------------+--------------+\n| 6c41b92b-e0f9-11e8-9924-de3112d0ce21 | 3 \u00a0 \u00a0 \u00a0 | 1967.      | 4. \u00a0 \u00a0 \u00a0 \u00a0 \u00a0     | 184703 \u00a0 \u00a0   |\n+--------------------------------------+---------+------------+------------------+--------------+\n1 row in set (0.000 sec)<\/pre>\n<p><strong>cluster_uuid<\/strong> is the uuid of the cluster, corresponding to the status variable: wsrep_cluster_state_uuid<br \/>\n<strong>view_id<\/strong> is the number of cluster configuration changes, corresponding to the status variable wsrep_cluster_conf_id<br \/>\n<strong>view_seqno<\/strong> is the latest Galera sequence number, corresponding to the status variable: wsrep_last_committed<br \/>\n<strong>protocol_version<\/strong> is the MariaDB wsrep patch version, corresponding to the status variable: wsrep_protocol_version<br \/>\n<strong>capabilities<\/strong> is the capabilities bitmask provided by the Galera library.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">MariaDB [mysql]&gt; select * from wsrep_cluster_members;\n+--------------------------------------+--------------------------------------+-----------+-----------------------+\n| node_uuid \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0\u00a0 | cluster_uuid \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 | node_name | node_incoming_address |\n+--------------------------------------+--------------------------------------+-----------+-----------------------+\n| 6542be69-ffd5-11e9-a2ed-a363df0547d5 | 6c41b92b-e0f9-11e8-9924-de3112d0ce21 | node1 \u00a0 \u00a0 | AUTO                  |\n| 6ae6fec5-ffd5-11e9-bb70-da54860baa6d | 6c41b92b-e0f9-11e8-9924-de3112d0ce21 | node2. \u00a0  | AUTO \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0 \u00a0  |\n| 7054b852-ffd5-11e9-8a45-72b6a9955d28 | 6c41b92b-e0f9-11e8-9924-de3112d0ce21 | node3\u00a0    | AUTO\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0\u00a0  |\n+--------------------------------------+--------------------------------------+-----------+-----------------------+\n3 rows in set (0.000 sec)<\/pre>\n<p>This system table display the current membership of the cluster.<br \/>\nIt contains a row for each node and member in the cluster.<br \/>\n<strong>node_uuid<\/strong> is the unique identifier of the master node.<br \/>\n<strong>cluster_uuid<\/strong> is the unique identifier of the cluster. It must be the same for all members.<br \/>\n<strong>node_name<\/strong> is explicit<br \/>\n<strong>node_incoming_address<\/strong> stores the IP address and port for client connections.<\/p>\n<pre class=\"brush: sql; gutter: true; first-line: 1\">MariaDB [mysql]&gt; select * from wsrep_streaming_log;\nEmpty set (0.000 sec)<\/pre>\n<p>This system table will contains rows only if there is a transaction which have the &#8220;streaming replication&#8221; enabled<\/p>\n<h3>Synchronization Functions<\/h3>\n<p>This new SQL functions can be used in wsrep synchronization operations.<br \/>\nIt is possibble to use them to obtain the GTID (Global Transaction ID)<br \/>\n<strong>WSREP_LAST_SEEN_GTID()<\/strong>: returns the GTID of the last write transaction observed by the client<br \/>\n<strong>WSREP_LAST_WRITTEN_GTID()<\/strong>: returns the GTID of the last write transaction made by the client<br \/>\n<strong>WSREP_SYNC_WAIT_UPTO_GTID()<\/strong>: blocks the client until the node applies and commits the given transaction<\/p>\n<h3>Conclusion:<\/h3>\n<p>These new features and especially the streaming replication, which is really an improvement and a huge boost to large<br \/>\ntransaction support, should bring to users and dba&#8217;s satisfaction and hopefully a better opinion of the MariaDB Galera cluster.<br \/>\nIn another blog, I will try to demonstrate how this streaming replication works.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Last month, by a new customer I had to install the latest version of the MariaDB server: 10.4.8 to setup a Galera Cluster with 3 master nodes. The good news was that this version was shipped with the latest version of the Galera Plugin from Codership: Galera Cluster 4.0. As usual, installation &amp; configuration was [&hellip;]<\/p>\n","protected":false},"author":28,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[229],"tags":[1731,141],"type_dbi":[],"class_list":["post-12974","post","type-post","status-publish","format-standard","hentry","category-database-administration-monitoring","tag-galera","tag-mariadb"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Galera Cluster 4 with MariaDB 10.4.8 - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Galera Cluster 4 with MariaDB 10.4.8\" \/>\n<meta property=\"og:description\" content=\"Last month, by a new customer I had to install the latest version of the MariaDB server: 10.4.8 to setup a Galera Cluster with 3 master nodes. The good news was that this version was shipped with the latest version of the Galera Plugin from Codership: Galera Cluster 4.0. As usual, installation &amp; configuration was [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2019-11-06T07:31:09+00:00\" \/>\n<meta name=\"author\" content=\"Open source Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Open source Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"4 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/\"},\"author\":{\"name\":\"Open source Team\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\"},\"headline\":\"Galera Cluster 4 with MariaDB 10.4.8\",\"datePublished\":\"2019-11-06T07:31:09+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/\"},\"wordCount\":516,\"commentCount\":0,\"keywords\":[\"Galera\",\"MariaDB\"],\"articleSection\":[\"Database Administration &amp; Monitoring\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/\",\"name\":\"Galera Cluster 4 with MariaDB 10.4.8 - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2019-11-06T07:31:09+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Galera Cluster 4 with MariaDB 10.4.8\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b\",\"name\":\"Open source Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g\",\"caption\":\"Open source Team\"},\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Galera Cluster 4 with MariaDB 10.4.8 - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/","og_locale":"en_US","og_type":"article","og_title":"Galera Cluster 4 with MariaDB 10.4.8","og_description":"Last month, by a new customer I had to install the latest version of the MariaDB server: 10.4.8 to setup a Galera Cluster with 3 master nodes. The good news was that this version was shipped with the latest version of the Galera Plugin from Codership: Galera Cluster 4.0. As usual, installation &amp; configuration was [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/","og_site_name":"dbi Blog","article_published_time":"2019-11-06T07:31:09+00:00","author":"Open source Team","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Open source Team","Est. reading time":"4 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/"},"author":{"name":"Open source Team","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"headline":"Galera Cluster 4 with MariaDB 10.4.8","datePublished":"2019-11-06T07:31:09+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/"},"wordCount":516,"commentCount":0,"keywords":["Galera","MariaDB"],"articleSection":["Database Administration &amp; Monitoring"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/","url":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/","name":"Galera Cluster 4 with MariaDB 10.4.8 - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2019-11-06T07:31:09+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/galera-cluster-4-with-mariadb-10-4-8\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Galera Cluster 4 with MariaDB 10.4.8"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/59554f0d99383431eb6ed427e338952b","name":"Open source Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/eb4fb12e386e8c41fdef0733e8114594cf2653e4f55e9fa2161442b8eaf3f657?s=96&d=mm&r=g","caption":"Open source Team"},"url":"https:\/\/www.dbi-services.com\/blog\/author\/open-source-team\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12974","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/28"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=12974"}],"version-history":[{"count":0,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/12974\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=12974"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=12974"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=12974"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=12974"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}