[MXS-1642] Unexpected length encoding 'ff' Created: 2018-02-01  Updated: 2018-03-20  Resolved: 2018-03-20

Status: Closed
Project: MariaDB MaxScale
Component/s: avrorouter
Affects Version/s: 2.2.1
Fix Version/s: N/A

Type: Bug Priority: Major
Reporter: Franck Leveneur Assignee: markus makela
Resolution: Incomplete Votes: 0
Labels: None


 Description   

I currently have Maxscale binlogrouter pointing to a Persona MySQL server (on the same server).

When I insert a transaction

INSERT INTO `trans` (`trans_id`, `trans_parent_id`, .....)
VALUES (374705437, NULL, ....);

Transaction goes through in Mysql, I see Avrorouter detecting it but it complains about Unexpected length encoding. I'm not sure if that error is responsible for the other errors. (different columns count, and fail to open file)

Looks like it's related to MXS-1130.
I did a clean refresh :
Stop maxscvle, deleted everything in /var/lib/maxscale/*, reset master,
generated the schema using go, generated binlog and avro dir in /var/lib/maxscale,
chmod -R 775 /var/lib/maxscale/binlog/
chmod -R 775 /var/lib/maxscale/avro/
Logged into maxscvle mysql to set up replication, start replication.

Inserted a transaction and it failed (see below).

2018-02-01 13:21:37 info : [avrorouter] Stopped processing file mysql-bin.000001 at position 13514. Waiting until more data is written before continuing. Next check in 15 seconds.
2018-02-01 13:21:52 info : [avrorouter] Processed 0 transactions and 0 row events.
2018-02-01 13:21:52 info : [avrorouter] Stopped processing file mysql-bin.000001 at position 13514. Waiting until more data is written before continuing. Next check in 15 seconds.
2018-02-01 13:22:07 notice : [avrorouter] Schema version 1 already exists: /var/lib/maxscale/avro//test.trans.000001.avsc
2018-02-01 13:22:07 info : [avrorouter] Table Map for 'test.trans' at 13651
2018-02-01 13:22:07 error : Unexpected length encoding 'ff' encountered when reading length-encoded integer.
2018-02-01 13:22:07 error : [avrorouter] Row event and table map event have different column counts for table test.trans, only full row image is currently supported.
2018-02-01 13:22:07 info : [avrorouter] Processed 2 transactions and 1 row events.
2018-02-01 13:22:07 error : Failed to initialize avrofile.
2018-02-01 13:22:07 error : [avrorouter] Failed to open file '/var/lib/maxscale/avro//test.trans.000001.avro' when generating file index.
2018-02-01 13:22:07 info : [avrorouter] Stopped processing file mysql-bin.000001 at position 14242. Waiting until more data is written before continuing. Next check in 2 seconds.
2018-02-01 13:22:09 info : [avrorouter] Processed 0 transactions and 0 row events.



 Comments   
Comment by markus makela [ 2018-02-06 ]

One thing that I noted is that the log contains an error about column count mismatch for the binary table format. This usually means that the binary logging in the master does not use the full row image for replication. You can enable this by adding binlog-format=ROW to the configuration. If possible, please check whether this solves the problem.

Comment by Franck Leveneur [ 2018-02-06 ]

I did verify that binlog = row and I use full image.

mysql> select @@version ;
---------------

@@version

---------------

5.7.20-19-log

---------------
5.7.20-19-log Percona Server

-----------------------------------------------------+

Variable_name Value

-----------------------------------------------------+

binlog_cache_size 32768
binlog_checksum CRC32
binlog_direct_non_transactional_updates OFF
binlog_error_action ABORT_SERVER
binlog_format ROW
binlog_group_commit_sync_delay 0
binlog_group_commit_sync_no_delay_count 0
binlog_gtid_simple_recovery ON
binlog_max_flush_queue_time 0
binlog_order_commits ON
binlog_row_image FULL
binlog_rows_query_log_events OFF
binlog_stmt_cache_size 32768
Comment by markus makela [ 2018-02-07 ]

If possible, please try with the latest development version of the 2.1 packages. These should be mostly equivalent with 2.2 packages with regards to the avrorouter. You can find the packages here: http://max-tst-01.mariadb.com/ci-repository/2.1/mariadb-maxscale/

Remember to first remove the old installation, clean out any files in /var/lib/maxscale/ and then install the 2.1 package.

Comment by markus makela [ 2018-03-05 ]

fleveneur any updates?

Comment by markus makela [ 2018-03-20 ]

No updates, closing as Incomplete. Once you've tested this with latest 2.1, please open this again if it still happens.

Generated at Thu Feb 08 04:08:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.