QNJR-GROUP / EasyTransaction

A distribute transaction solution(分布式事务) unified the usage of TCC , SAGA ,FMT (seata/fescar AutoCompensation), reliable message, compensate and so on;
Apache License 2.0
2.36k stars 810 forks source link

关于幂等表的设计 #95

Open MiracleJy opened 5 years ago

MiracleJy commented 5 years ago

CREATE TABLE idempotent ( src_app_id smallint(5) unsigned NOT NULL COMMENT '来源AppID', src_bus_code smallint(5) unsigned NOT NULL COMMENT '来源业务类型', src_trx_id bigint(20) unsigned NOT NULL COMMENT '来源交易ID', app_id smallint(5) NOT NULL COMMENT '调用APPID', bus_code smallint(5) NOT NULL COMMENT '调用的业务代码', call_seq smallint(5) NOT NULL COMMENT '同一事务同一方法内调用的次数', handler smallint(5) NOT NULL COMMENT '处理者appid', called_methods varchar(64) NOT NULL COMMENT '被调用过的方法名', md5 binary(16) NOT NULL COMMENT '参数摘要', sync_method_result blob COMMENT '同步方法的返回结果', create_time datetime NOT NULL COMMENT '执行时间', update_time datetime NOT NULL, lock_version smallint(32) NOT NULL COMMENT '乐观锁版本号', PRIMARY KEY (src_app_id,src_bus_code,src_trx_id,app_id,bus_code,call_seq,handler) ) ENGINE=InnoDB DEFAULT CHARSET=utf8;

请问幂等表的设计中src_app_id、src_bus_code、src_trx_id是代表调用者信息,app_id、bus_code代表被调用者信息吗?call_seq代表什么?

skyesx commented 5 years ago

有更正:

如注释及你所描述: