[MXS-1191] Alter statement to a table with no create statement. Created: 2017-03-20 Updated: 2017-05-18 Resolved: 2017-05-18 |
|
| Status: | Closed |
| Project: | MariaDB MaxScale |
| Component/s: | avrorouter |
| Affects Version/s: | 2.0.5 |
| Fix Version/s: | 2.0.6 |
| Type: | Bug | Priority: | Major |
| Reporter: | Josh Becker | Assignee: | markus makela |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Issue Links: |
|
||||||||
| Sprint: | 2017-32, 2017-33 | ||||||||
| Description |
|
I was running MaxScale perfectly fine for about 3 days and then this error appeared. I used the provided go tool to create all avro schemas before maxscale was ever started. 2017-03-18 00:38:08 error : Alter statement to a table with no create statement. Let me know what else would be helpful to provide to debug. |
| Comments |
| Comment by markus makela [ 2017-04-04 ] |
|
This is possibly caused by an ALTER TABLE DROP COLUMN statement being executed with user generated schemas. It will cause the avrorouter to mix up the column counts and it will use unallocated memory. |
| Comment by Josh Becker [ 2017-04-04 ] |
|
By user generated, do you mean by using the go tool to generate the avsc files? I've also noticed that new tables that have been created aren't showing a corresponding avsc file in the avro directory, this should occur as the create table statement comes through, right? |
| Comment by markus makela [ 2017-04-04 ] |
|
Yes, either the go tool or by manually defining the JSON schema. The fact that there are missing avsc files does point to the fact that there might be something wrong in the schema versioning. Each CREATE TABLE or ALTER TABLE should create a new .avsc file, and if this is not happening, something is broken. I'll look into the schema generation with ALTER TABLE and CREATE TABLE but the immediate problem of ALTER TABLE causing a crash has been fixed. Could you open a new issue for the .avsc file problem? |
| Comment by Josh Becker [ 2017-04-04 ] |
|
Perfect will do. Which branch is the fix on? |
| Comment by markus makela [ 2017-04-04 ] |
|
It's on the 2.0 branch. I've also pushed a Python 3 version of the cdc_schema Go tool for those cases where building the tool is not an option. |
| Comment by markus makela [ 2017-04-20 ] |
|
I've build packages from commit a418387d0a8fa2372f78eb2fe351122c6b3ab024: http://max-tst-01.mariadb.com/ci-repository/2.0-apr20/mariadb-maxscale/ These packages contain the fixes for the handling of ALTER TABLE statements that can cause crashes. |
| Comment by Josh Becker [ 2017-04-24 ] |
|
Just installed that package and receive the following error on startup (I suspect it wasn't compiled with the avrorouter?): 2017-04-24 13:23:19 error : Unable to find library for module: avrorouter. Module dir: /usr/lib/x86_64-linux-gnu/maxscale
|
| Comment by markus makela [ 2017-05-08 ] |
|
Yes, apologies for this mistake, we had some problems which we solved since then. I've build a new set of packages where the avrorouter is now properly built: http://max-tst-01.mariadb.com/ci-repository/2.0-may8/mariadb-maxscale/ |
| Comment by markus makela [ 2017-05-18 ] |
|
I've created packages from commit 5a0d2c54bd564688af44695067953ac16a09ee85 which fixes a few bugs. The packages can be found here: http://max-tst-01.mariadb.com/ci-repository/2.0-may15/mariadb-maxscale/ Please test these packages and see if they fix your problems. |
| Comment by markus makela [ 2017-05-18 ] |
|
Closing as fixed. Please try the packages and if the problem persists, reopen this issue. |