Description
Description
After create a null schema in Src, create a job ,then insert data to Src 's schema .The Dtle is 'panic'.
Steps to reproduce the issue:
1.create a null schema in Src
create database test1;
2. create job
curl -H "Accept:application/json" -XPOST "http://10.186.62.57:9190/v1/jobs" -d @job7.json -s | jq
3.insert data to Src schema
/opt/sysbench0.5/bin/sysbench --test=/opt/sysbench0.5/db/insert.lua --oltp-table-size=100 --oltp-tables-count=1 --mysql-host=172.100.9.1 --mysql-user=test1 --mysql-password=test1 --mysql-port=3306 --num-threads=1 --mysql-db=test1 --report-interval=20 prepare
Describe the results you received:
the dtle is 'panic'
Describe the results you expected:
the dtle is normal
Output of ./dtle version
:
Dtle 9.9.9.9 (git: feature/api-dead-desc 09b336b)
Additional information you deem important (e.g. issue happens only occasionally):
Additional details (log, config, job config etc):
-
job.json
job7.json.txt
[root@node4 /]# [2019/05/27 17:04:25] [info] binlogsyncer.go:132 create BinlogSyncer with config {1325887729 mysql 172.100.9.1 3306 test1 false false <nil> false UTC true 0 3s 6s 3 false}
[2019/05/27 17:04:25] [info] binlogsyncer.go:364 begin to sync binlog from GTID set 8868d98f-af5e-11e8-9aa9-0242ac110002:1-8148
[2019/05/27 17:04:25] [info] binlogsyncer.go:195 register slave for master server 172.100.9.1:3306
[2019/05/27 17:04:25] [info] binlogsyncer.go:715 rotate to (1.000001, 4)
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0xf6a1b3]
goroutine 5971 [running]:
github.com/actiontech/dtle/internal/client/driver/mysql/binlog.(*BinlogReader).handleEvent(0xc420ee0480, 0xc420b1f590, 0xc420cb1740, 0x0, 0x0)
/mnt/hgfs/action/src/github.com/actiontech/dtle/internal/client/driver/mysql/binlog/binlog_reader.go:624 +0x2813
github.com/actiontech/dtle/internal/client/driver/mysql/binlog.(*BinlogReader).DataStreamEvents(0xc420ee0480, 0xc420cb1740, 0xc4200f7680, 0xc4210340f0)
/mnt/hgfs/action/src/github.com/actiontech/dtle/internal/client/driver/mysql/binlog/binlog_reader.go:732 +0x22c
github.com/actiontech/dtle/internal/client/driver/mysql.(*Extractor).StreamEvents(0xc4200f7680, 0x165c095, 0x24)
/mnt/hgfs/action/src/github.com/actiontech/dtle/internal/client/driver/mysql/extractor.go:881 +0x80
github.com/actiontech/dtle/internal/client/driver/mysql.(*Extractor).initiateStreaming.func1(0xc4200f7680)
/mnt/hgfs/action/src/github.com/actiontech/dtle/internal/client/driver/mysql/extractor.go:489 +0x66
created by github.com/actiontech/dtle/internal/client/driver/mysql.(*Extractor).initiateStreaming
/mnt/hgfs/action/src/github.com/actiontech/dtle/internal/client/driver/mysql/extractor.go:487 +0x3f
[1]+ Exit 2 /opt/dtle/usr/bin/dtle server -config=/opt/dtle/etc/dtle/dtle.conf