-
Bug
-
Resolution: Done
-
Minor
-
1.2.3.Final
-
None
-
False
-
False
-
Undefined
-
-
If a MySQL connector is initially created with `snapshot.new.tables: parallel` configured, and then that configuration is removed, the custom offset metadata will remain.
In certain edge cases, the resulting state will halt message processing.
The "custom offset metadata" I'm referring to is the following
public static final String DATABASE_WHITELIST_KEY = "database_whitelist"; public static final String DATABASE_BLACKLIST_KEY = "database_blacklist"; public static final String TABLE_WHITELIST_KEY = "table_whitelist"; public static final String TABLE_BLACKLIST_KEY = "table_blacklist";
Which was added as a part of: DBZ-387
The problem with this metadata remaining in the offsets arises when the connector is modified to `schema_only` mode and a new table is added to its whitelist. The connector with the newly updated whitelist will sit consuming no rows at all, with no error messages.
The fix for a connector in this state is to manually change its most recent offset event. An example of the the change needed to fix a connector in this state is described below:
{ "table_whitelist":"shopify_shard_126.(some|tables)","ts_sec":1600799733,"file":"binlog.233769","table_blacklist":null,"pos":79078651,"database_whitelist":"shopify_shard_126","database_blacklist":null,"gtids":"2636c975-cca6-11e8-abee-42010aef0017:1-33622507,311af35b-cca6-11e8-a7f4-42010aef0016:1-553659615,730ba419-0019-11ea-a4eb-42010aef00ee:1-901577661,a75c0b5e-001a-11ea-88cc-42010ae700a7:1-200018057,d5f00eed-cca5-11e8-a548-42010ae7000c:1-244272080,e9cceed4-cca5-11e8-a5fa-42010ae70029:1-295996960","row":1,"server_id":2310167,"event":3 }
to:
{ "ts_sec":1600799733,"file":"binlog.233769","pos":79078651,"gtids":"2636c975-cca6-11e8-abee-42010aef0017:1-33622507,311af35b-cca6-11e8-a7f4-42010aef0016:1-553659615,730ba419-0019-11ea-a4eb-42010aef00ee:1-901577661,a75c0b5e-001a-11ea-88cc-42010ae700a7:1-200018057,d5f00eed-cca5-11e8-a548-42010ae7000c:1-244272080,e9cceed4-cca5-11e8-a5fa-42010ae70029:1-295996960","row":1,"server_id":2310167,"event":3 }
I am not sure why the connector gets into a state of processing no new records when this occurs, but I have verified that the mismatch of `table_whitelist` from the offset metadata and `table.whitelist` from the connector config causes this problem.