摘要:
记录dbpack核心流程
核心函数:
processAfterInsert
Thread 7 "dbpack" hit Breakpoint 1, /cectc/dbpack/pkg/filter/dt.(*_mysqlFilter).processAfterInsert (f=0xc00051fb80, ctx=..., conn=0xc0003e6e00, result=..., stmt=0xc000578b80,
insertStmt=0xc0004dfd40, ~r0=...) at /root/work/dbpack/pkg/filter/dt/filter_mysql.go:244
244 log.Debugf("insert, branch id: %d", branchID)
(gdb) bt
#0 /cectc/dbpack/pkg/filter/dt.(*_mysqlFilter).processAfterInsert (f=0xc00051fb80, ctx=..., conn=0xc0003e6e00, result=..., stmt=0xc000578b80, insertStmt=0xc0004dfd40, ~r0=...)
at /root/work/dbpack/pkg/filter/dt/filter_mysql.go:244
#1 0x0000000001649dc5 in /cectc/dbpack/pkg/filter/dt.(*_mysqlFilter).PostHandle (f=0xc00051fb80, ctx=..., result=..., conn=..., ~r0=...) at /root/work/dbpack/pkg/filter/dt/filter_mysql.go:129
#2 0x00000000010f6efb in /cectc/dbpack/pkg/sql.(*DB).doConnectionPostFilter (db=0xc000661a40, ctx=..., result=..., conn=..., ~r0=...) at /root/work/dbpack/pkg/sql/db.go:227
#3 0x00000000010f85f9 in /cectc/dbpack/pkg/sql.(*Tx).ExecuteStmt (tx=0xc00000d908, ctx=..., stmt=0xc000578b80, ~r0=..., ~r1=0, ~r2=...) at /root/work/dbpack/pkg/sql/tx.go:64
#4 0x0000000001640d9c in /cectc/dbpack/pkg/executor.(*SingleDBExecutor).ExecutorComStmtExecute (executor=0xc00051c5f0, ctx=..., stmt=0xc000578b80, ~r0=..., ~r1=0, ~r2=...)
at /root/work/dbpack/pkg/executor/single_db.go:204
#5 0x000000000170f965 in /cectc/dbpack/pkg/listener.(*MysqlListener).ExecuteCommand.func2 (c=0xc0002920f0, l=0xc0003de150, data=..., ctx=..., commandType=23 '\027', ~r0=...)
at /root/work/dbpack/pkg/listener/mysql.go:691
#6 0x000000000170e638 in /cectc/dbpack/pkg/listener.(*MysqlListener).ExecuteCommand (l=0xc0003de150, ctx=..., c=0xc0002920f0, data=..., ~r0=...) at /root/work/dbpack/pkg/listener/mysql.go:723
#7 0x000000000170a4d1 in /cectc/dbpack/pkg/listener.(*MysqlListener).handle (l=0xc0003de150, conn=..., connectionID=1) at /root/work/dbpack/pkg/listener/mysql.go:195
#8 0x0000000001709bf3 in /cectc/dbpack/pkg/listener.(*MysqlListener).Listen.func1 () at /root/work/dbpack/pkg/listener/mysql.go:141
#9 0x000000000046b641 in runtime.goexit () at /usr/local/go/src/runtime/asm_amd64.s:1571
#10 0x0000000000000000 in ?? ()
ExecutorComQuery
(gdb) bt
#0 /cectc/dbpack/pkg/executor.(*SingleDBExecutor).ExecutorComQuery (executor=0xc00051c5f0, ctx=..., sql=..., ~r0=..., ~r1=0, ~r2=...) at /root/work/dbpack/pkg/executor/single_db.go:138
#1 0x000000000171074d in /cectc/dbpack/pkg/listener.(*MysqlListener).ExecuteCommand.func1 (c=0xc00051d270, data=..., l=0xc0003de150, ctx=..., commandType=3 '\003', ~r0=...)
at /root/work/dbpack/pkg/listener/mysql.go:554
#2 0x000000000170d6e5 in /cectc/dbpack/pkg/listener.(*MysqlListener).ExecuteCommand (l=0xc0003de150, ctx=..., c=0xc00051d270, data=..., ~r0=...) at /root/work/dbpack/pkg/listener/mysql.go:585
#3 0x000000000170a4d1 in /cectc/dbpack/pkg/listener.(*MysqlListener).handle (l=0xc0003de150, conn=..., connectionID=2) at /root/work/dbpack/pkg/listener/mysql.go:195
#4 0x0000000001709bf3 in /cectc/dbpack/pkg/listener.(*MysqlListener).Listen.func1 () at /root/work/dbpack/pkg/listener/mysql.go:141
#5 0x000000000046b641 in runtime.goexit () at /usr/local/go/src/runtime/asm_amd64.s:1571
#6 0x0000000000000000 in ?? ()