Krishnamurthy Hegde
Krishnamurthy Hegde

Reputation: 43

Debezium MySQL Connector - Primary Server Configuration for binlog_row_image setting

We have a primary MySQL server and a secondary/replica server. Debezium connector is configured to read from the replica server.

Per the Debezium documentation, we configured the below settings on the replica server only. Also did a replica server restart.

binlog_format     = ROW
binlog_row_image  = FULL

On the primary server the binlog_row_image is set to MINIMAL.

While this configuration worked fine for the initial-snapshot data, further updates to data in the primary server caused the Debezium to throw the below error:

ava.lang.IllegalArgumentException: Unexpected value for JDBC type 12 and column coupon_code VARCHAR(45) CHARSET latin1 NOT NULL: class=class java.time.LocalDateTime

The error went away after the binlog_row_image was set to FULL on the primary server also.

Question: Aren't the binlogs independent on the primary and replica servers? If so, what is the need for us to set the binlog_row_image = FULL on the primary as well?

Note: our intention is to avoid making this above setting on primary due to the concerns of increase in storage and possible impact on server performance.

UPDATE

Below is the output of the SHOW CREATE TABLE statement on both primary and replica. The results were IDENTICAL.

CREATE TABLE `admin_user` (
   `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'User ID',
   `firstname` varchar(32) DEFAULT NULL COMMENT 'User First Name',
   `lastname` varchar(32) DEFAULT NULL COMMENT 'User Last Name',
   `email` varchar(128) DEFAULT NULL COMMENT 'User Email',
   `username` varchar(40) DEFAULT NULL COMMENT 'User Login',
   `password` varchar(255) NOT NULL COMMENT 'User Password',
   `created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'User Created Time',
   `modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'User Modified Time',
   `is_active` smallint(6) NOT NULL DEFAULT '1' COMMENT 'User Is Active',
   `interface_locale` varchar(16) NOT NULL DEFAULT 'en_US' COMMENT 'Backend interface locale',
   `lock_expires` timestamp NULL DEFAULT NULL COMMENT 'Expiration Lock Dates',
   PRIMARY KEY (`user_id`),
   UNIQUE KEY `ADMIN_USER_USERNAME` (`username`)
 ) ENGINE=InnoDB AUTO_INCREMENT=337 DEFAULT CHARSET=utf8 COMMENT='Admin User Table'

Also, note that these are Azure Managed Mysql instances.

Upvotes: 0

Views: 405

Answers (0)

Related Questions