Bughue commented on code in PR #745: URL: https://github.com/apache/incubator-seata-go/pull/745#discussion_r1967148486
########## pkg/rm/tcc/fence/store/db/sql/tcc_fence_store_sql.go: ########## @@ -28,20 +28,32 @@ var ( // localTccLogPlaced The enum LocalTccLogPlaced localTccLogPlaced = " %s " + pramPlaceHolder = "%s " + // insertLocalTccLog The enum InsertLocalTccLog insertLocalTccLog = "insert into " + localTccLogPlaced + " (xid, branch_id, action_name, status, gmt_create, gmt_modified) values ( ?,?,?,?,?,?)" // queryByBranchIdAndXid The enum QueryByBranchIdAndXid queryByBranchIdAndXid = "select xid, branch_id, action_name, status, gmt_create, gmt_modified from " + localTccLogPlaced + " where xid = ? and branch_id = ? for update" + // queryByMdDate The enum QueryByMdDate + queryByMdDate = "select xid, branch_id from " + localTccLogPlaced + " where gmt_modified < ? " + + " and status in (" + strconv.Itoa(int(enum.StatusCommitted)) + " , " + strconv.Itoa(int(enum.StatusRollbacked)) + " , " + strconv.Itoa(int(enum.StatusSuspended)) + ")" + // updateStatusByBranchIdAndXid The enum UpdateStatusByBranchIdAndXid updateStatusByBranchIdAndXid = "update " + localTccLogPlaced + " set status = ?, gmt_modified = ? where xid = ? and branch_id = ? and status = ? " // deleteByBranchIdAndXid The enum DeleteByBranchIdAndXid deleteByBranchIdAndXid = "delete from " + localTccLogPlaced + " where xid = ? and branch_id = ? " + // deleteByBranchIdsAndXids The enum DeleteByBranchIdsAndXids + deleteByBranchIdsAndXids = "delete from " + localTccLogPlaced + " where (xid,branch_id) in (" + pramPlaceHolder + ")" Review Comment: 做清除动作的时候根据xid去做就好了吧?会有同一个xid里的一部分分支要清除,另一部分还留着的诉求吗? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org For additional commands, e-mail: notifications-h...@seata.apache.org