[MDEV-24945] Document new wsrep_mode system variable for Galera in 10.6 Created: 2021-02-23  Updated: 2023-12-15

Status: Open
Project: MariaDB Server
Component/s: Documentation, Galera
Fix Version/s: 10.6

Type: Task Priority: Major
Reporter: Jan Lindström (Inactive) Assignee: Joe Cotellese
Resolution: Unresolved Votes: 0
Labels: None

Issue Links:
PartOf
Relates
relates to MDEV-20008 Galera strict mode Closed
relates to MDEV-24830 Write a warning to error log if Galer... Closed

 Description   

Two new features for Galera

  • Write a warning to error log if Galera replicates InnoDB table with no primary key
  • Write a warning to error log if Galera replicates a table with storage engine not supported by Galera

Rules

  • Write a warning to error log if Galera replicates table with storage engine not supported by Galera (at the moment only InnoDB is supported if log_warnings > 1
    • Warning is pushed to client also
    • MyISAM is allowed if wsrep_replicate_myisam=ON
  • Write a warning to error log if Galera replicates table with no primary key if log_warnings > 1
    • Warning is pushed to client also
    • MyISAM is allowed if wsrep_relicate_myisam=ON
  • In both cases apply flood control if >= 10 same warning is writen to error log (requires log_warnings > 1), flood control will suppress warnings for 300 seconds


 Comments   
Comment by Jan Lindström (Inactive) [ 2021-02-23 ]

Example 1:

CREATE TABLE t1(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=INNODB;
CREATE TABLE t2(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=MYISAM;
CREATE TABLE t3(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=ARIA;
CREATE TABLE t4(a int NOT NULL PRIMARY KEY, b varchar(50)) ENGINE=MEMORY;
SET GLOBAL wsrep_replicate_myisam=ON;
SET GLOBAL log_warnings=2;
SET GLOBAL wsrep_mode= STRICT_REPLICATION;
INSERT INTO t1 values (1,'innodb1');
INSERT INTO t2 values (1,'myisam1');
INSERT INTO t3 values (1,'aria1');
Warnings:
Warning        1290    WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine Aria for table 'test'.'t3' is not supported in Galera
INSERT INTO t4 values (1,'memory1');
Warnings:
Warning        1290    WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MEMORY for table 'test'.'t4' is not supported in Galera
SET GLOBAL wsrep_replicate_myisam=OFF;
INSERT INTO t2 values (2,'myisam2');
Warnings:
Warning        1290    WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM for table 'test'.'t2' is not supported in Galera

Error log:

2021-02-23  8:03:57 11 [Warning] WSREP: wsrep_mode = STRICT_REPLICATION enabled. Storage engine MyISAM for table 'test'.'t2' is not supported in Galera
2021-02-23  8:03:57 11 [Note] WSREP: Suppressing warnings of type 'WSREP_REQUIRE_INNODB' for up to 300 seconds because of flooding

Example2:

CREATE TABLE t1(a int, b varchar(50)) ENGINE=INNODB;
CREATE TABLE t2(a int, b varchar(50)) ENGINE=MYISAM;
CREATE TABLE t3(a int, b varchar(50)) ENGINE=MEMORY;
SET GLOBAL wsrep_replicate_myisam=ON;
SET GLOBAL log_warnings=2;
SET GLOBAL wsrep_mode= REQUIRED_PRIMARY_KEY;
INSERT INTO t1 values (1,'test1');
Warnings:
Warning        1290    WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined.
INSERT INTO t2 values (1,'myisam1');
Warnings:
Warning        1290    WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t2' should have PRIMARY KEY defined.

Error log:

2021-02-23  8:07:46 11 [Warning] WSREP: wsrep_mode = REQUIRED_PRIMARY_KEY enabled. Table 'test'.'t1' should have PRIMARY KEY defined
2021-02-23  8:07:46 11 [Note] WSREP: Suppressing warnings of type 'WSREP_REQUIRE_PRIMARY_KEY' for up to 300 seconds because of flooding

Generated at Thu Feb 08 09:33:54 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.