otter source code analysis - (1) debug node source code

To solve a source code question, you need the debug otter node module.
After the synchronization task is enabled, the mainstem of the local node always displays: Positioning, after the data is changed, the synchronization function is unavailable.


 
 
The bug information is as follows
pid:8 nid:3 exception:canal:test_cancal_debug:java.lang.NullPointerException 
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.loadBinlogChecksum(MysqlConnection.java:284) 
at com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.dump(MysqlConnection.java:113) 
at com.alibaba.otter.canal.parse.inbound.AbstractEventParser$3.run(AbstractEventParser.java:209) 
at java.lang.Thread.run(Thread.java:745) 
This problem is that the current 1.0.23 version of canal has some problems, refer to https://github.com/alibaba/otter/issues/258
 
I thought of a way: to associate the local canal source code, and then manually fix the canal bug.
The cannal source link is as follows
The otter source link is as follows
 
The first step is to fix the source code bug
After observation, it turns out that com.alibaba.otter.canal.parse.inbound.mysql.MysqlConnection.loadBinlogChecksum 中
columnValues.get(0) is not empty, make the following modifications


 
 
The second step is to update otter main pom.xml


 
The third step otter all modules execute maven update.
 
Verified by myself, works well.

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=326693155&siteId=291194637