博客详情

SpringCloud-alibaba 集成seata(AT模式) (原创)

作者: 朝如青丝暮成雪
发布时间:2025-10-27 15:15:29  文章分类:java编程   阅读(64)  评论(0)

SpringCloud-alibaba 集成seata(AT模式)

[TOC]

一、部署seata-server

1.1、创建seata控制台DB

创建db,执行数据库脚本

CREATE DATABASE `seata_1.6` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci;

USE `seata_1.6`;
DROP TABLE IF EXISTS `branch_table`;
CREATE TABLE `branch_table` (
  `branch_id` bigint NOT NULL,
  `xid` varchar(128) NOT NULL,
  `transaction_id` bigint DEFAULT NULL,
  `resource_group_id` varchar(32) DEFAULT NULL,
  `resource_id` varchar(256) DEFAULT NULL,
  `branch_type` varchar(8) DEFAULT NULL,
  `status` tinyint DEFAULT NULL,
  `client_id` varchar(64) DEFAULT NULL,
  `application_data` varchar(2000) DEFAULT NULL,
  `gmt_create` datetime(6) DEFAULT NULL,
  `gmt_modified` datetime(6) DEFAULT NULL,
  PRIMARY KEY (`branch_id`),
  KEY `idx_xid` (`xid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;



DROP TABLE IF EXISTS `distributed_lock`;
CREATE TABLE `distributed_lock` (
  `lock_key` char(20) NOT NULL,
  `lock_value` varchar(20) NOT NULL,
  `expire` bigint DEFAULT NULL,
  PRIMARY KEY (`lock_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

insert  into `distributed_lock`(`lock_key`,`lock_value`,`expire`) values ('AsyncCommitting',' ',0),('RetryCommitting',' ',0),('RetryRollbacking',' ',0),('TxTimeoutCheck',' ',0);


DROP TABLE IF EXISTS `global_table`;
CREATE TABLE `global_table` (
  `xid` varchar(128) NOT NULL,
  `transaction_id` bigint DEFAULT NULL,
  `status` tinyint NOT NULL,
  `application_id` varchar(32) DEFAULT NULL,
  `transaction_service_group` varchar(32) DEFAULT NULL,
  `transaction_name` varchar(128) DEFAULT NULL,
  `timeout` int DEFAULT NULL,
  `begin_time` bigint DEFAULT NULL,
  `application_data` varchar(2000) DEFAULT NULL,
  `gmt_create` datetime DEFAULT NULL,
  `gmt_modified` datetime DEFAULT NULL,
  PRIMARY KEY (`xid`),
  KEY `idx_status_gmt_modified` (`status`,`gmt_modified`),
  KEY `idx_transaction_id` (`transaction_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;


DROP TABLE IF EXISTS `lock_table`;
CREATE TABLE `lock_table` (
  `row_key` varchar(128) NOT NULL,
  `xid` varchar(128) DEFAULT NULL,
  `transaction_id` bigint DEFAULT NULL,
  `branch_id` bigint NOT NULL,
  `resource_id` varchar(256) DEFAULT NULL,
  `table_name` varchar(32) DEFAULT NULL,
  `pk` varchar(36) DEFAULT NULL,
  `status` tinyint NOT NULL DEFAULT '0' COMMENT '0:locked ,1:rollbacking',
  `gmt_create` datetime DEFAULT NULL,
  `gmt_modified` datetime DEFAULT NULL,
  PRIMARY KEY (`row_key`),
  KEY `idx_status` (`status`),
  KEY `idx_branch_id` (`branch_id`),
  KEY `idx_xid` (`xid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;

1.2、解压安装seata-server

unzip seata-server-1.6.0.zip #解压当前目录
mv seata  /usr/local/  #移动目录
cd /usr/local/
mv seata  seata-server-1.6  #重命名

1.3、修改seata-server配置

cd /usr/local/seata-server-1.6/conf
cp -rf application.yml  application.yml.bak #备份一下
vi application.yml

修改配置内容如下

server:
  port: 7091

spring:
  application:
    name: seata-server

logging:
  config: classpath:logback-spring.xml
  file:
    path: ${user.home}/logs/seata

console:
  user:
    username: seata
    password: seata

seata:
  security:
    secretKey: icilfnMRQmKi847ofQUD9UrNaStS9sl0tKlc21s6uSBRbrSldZzVLuPMEfkZZlP3
    tokenValidityInMilliseconds: 1800000
    ignore:
      urls: /,/**/*.css,/**/*.js,/**/*.html,/**/*.map,/**/*.svg,/**/*.png,/**/*.ico,/console-fe/public/**,/api/v1/auth/login

  config:
    type: nacos
    nacos:
      server-addr: 127.0.0.1:8848
      namespace: seata
      group: DEFAULT_GROUP
      username: riskmage
      password: zQsZFHx*s^
      context-path: 
      data-id: seataServer.properties

  registry:
    type: nacos
    nacos:
      application: seata-server
      server-addr: 127.0.0.1:8848
      group: DEFAULT_GROUP
      namespace: seata
      cluster: default
      username: riskmage
      password: zQsZFHx*s^
      context-path:
  server:
    service-port: 8091 #If not configured, the default is '${server.port} + 1000'
    max-commit-retry-timeout: -1
    max-rollback-retry-timeout: -1
    rollback-retry-timeout-unlock-enable: false
    enable-check-auth: true
    enable-parallel-request-handle: true
    retry-dead-threshold: 130000
    xaer-nota-retry-timeout: 60000
    recovery:
      committing-retry-period: 1000
      async-committing-retry-period: 1000
      rollbacking-retry-period: 1000
      timeout-retry-period: 1000
    undo:
      log-save-days: 7
      log-delete-period: 86400000
    session:
      branch-async-queue-size: 5000 #branch async remove queue size
      enable-branch-async-remove: false #enable to asynchronous remove branchSession
  store:
    mode: db
    session:
      mode: db
    lock:
      mode: db
    file:
      dir: sessionStore
      max-branch-session-size: 16384
      max-global-session-size: 512
      file-write-buffer-cache-size: 16384
      session-reload-read-size: 100
      flush-disk-mode: async
    db:
      datasource: druid
      db-type: mysql
      driver-class-name: com.mysql.cj.jdbc.Driver
      url: jdbc:mysql://127.0.0.1:3306/seata_1.6?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
      user: root
      password: HHN!CnyCHD
      min-conn: 5
      max-conn: 50
      global-table: global_table
      branch-table: branch_table
      lock-table: lock_table
      distributed-lock-table: distributed_lock
      query-limit: 100
      max-wait: 5000

  metrics:
    enabled: false
    registry-type: compact
    exporter-list: prometheus
    exporter-prometheus-port: 9898
  transport:
    rpc-tc-request-timeout: 30000
    enable-tc-server-batch-send-response: false
    shutdown:
      wait: 3
    thread-factory:
      boss-thread-prefix: NettyBoss
      worker-thread-prefix: NettyServerNIOWorker
      boss-thread-size: 1

1.4、创建seata相关nacos配置

1、创建seata名称空间,并新增配置文件 seataServer.propertiesservice.vgroupMapping.default_tx_group

image-20250827085819331

seataServer.properties 配置内容如下

#For details about configuration items, see https://seata.io/zh-cn/docs/user/configurations.html
#Transport configuration, for client and server
transport.type=TCP
transport.server=NIO
transport.heartbeat=true
transport.enableTmClientBatchSendRequest=false
transport.enableRmClientBatchSendRequest=true
transport.enableTcServerBatchSendResponse=false
transport.rpcRmRequestTimeout=30000
transport.rpcTmRequestTimeout=30000
transport.rpcTcRequestTimeout=30000
transport.threadFactory.bossThreadPrefix=NettyBoss
transport.threadFactory.workerThreadPrefix=NettyServerNIOWorker
transport.threadFactory.serverExecutorThreadPrefix=NettyServerBizHandler
transport.threadFactory.shareBossWorker=false
transport.threadFactory.clientSelectorThreadPrefix=NettyClientSelector
transport.threadFactory.clientSelectorThreadSize=1
transport.threadFactory.clientWorkerThreadPrefix=NettyClientWorkerThread
transport.threadFactory.bossThreadSize=1
transport.threadFactory.workerThreadSize=default
transport.shutdown.wait=3
transport.serialization=seata
transport.compressor=none


#Transaction routing rules configuration, only for the client
service.vgroupMapping.default_tx_group=default
#If you use a registry, you can ignore it
#service.default.grouplist=127.0.0.1:8091

service.enableDegrade=false
service.disableGlobalTransaction=false

#Transaction rule configuration, only for the client 
client.rm.asyncCommitBufferLimit=10000
client.rm.lock.retryInterval=10
client.rm.lock.retryTimes=30
client.rm.lock.retryPolicyBranchRollbackOnConflict=true
client.rm.reportRetryCount=5
client.rm.tableMetaCheckEnable=true
client.rm.tableMetaCheckerInterval=60000
client.rm.sqlParserType=druid
client.rm.reportSuccessEnable=false
client.rm.sagaBranchRegisterEnable=false
client.rm.sagaJsonParser=fastjson
client.rm.tccActionInterceptorOrder=-2147482648
client.tm.commitRetryCount=5
client.tm.rollbackRetryCount=5
client.tm.defaultGlobalTransactionTimeout=60000
client.tm.degradeCheck=false
client.tm.degradeCheckAllowTimes=10
client.tm.degradeCheckPeriod=2000
client.tm.interceptorOrder=-2147482648
client.undo.dataValidation=true
client.undo.logSerialization=kryo
client.undo.onlyCareUpdateColumns=true
server.undo.logSaveDays=7
server.undo.logDeletePeriod=86400000
client.undo.logTable=undo_log
client.undo.compress.enable=true
client.undo.compress.type=zip
client.undo.compress.threshold=64k
#For TCC transaction mode
tcc.fence.logTableName=tcc_fence_log
tcc.fence.cleanPeriod=1h

#Log rule configuration, for client and server
log.exceptionRate=100

#Transaction storage configuration, only for the server. The file, db, and redis configuration values are optional.
store.mode=db
store.lock.mode=file
store.session.mode=file
#Used for password encryption
store.publicKey=

#If `store.mode,store.lock.mode,store.session.mode` are not equal to `file`, you can remove the configuration block.
store.file.dir=file_store/data
store.file.maxBranchSessionSize=16384
store.file.maxGlobalSessionSize=512
store.file.fileWriteBufferCacheSize=16384
store.file.flushDiskMode=async
store.file.sessionReloadReadSize=100

#These configurations are required if the `store mode` is `db`. If `store.mode,store.lock.mode,store.session.mode` are not equal to `db`, you can remove the configuration block.
store.db.datasource=druid
store.db.dbType=mysql
store.db.driverClassName=com.mysql.jdbc.Driver
store.db.url=jdbc:mysql://47.121.215.73:3306/seata_1.6?useUnicode=true&characterEncoding=utf-8&useSSL=false&serverTimezone=GMT%2B8&allowMultiQueries=true&rewriteBatchedStatements=true
store.db.user=root
store.db.password=HHN!CnyCHD
store.db.minConn=5
store.db.maxConn=30
store.db.globalTable=global_table
store.db.branchTable=branch_table
store.db.distributedLockTable=distributed_lock
store.db.queryLimit=100
store.db.lockTable=lock_table
store.db.maxWait=5000

#These configurations are required if the `store mode` is `redis`. If `store.mode,store.lock.mode,store.session.mode` are not equal to `redis`, you can remove the configuration block.
store.redis.mode=single
store.redis.single.host=127.0.0.1
store.redis.single.port=6379
store.redis.sentinel.masterName=
store.redis.sentinel.sentinelHosts=
store.redis.maxConn=10
store.redis.minConn=1
store.redis.maxTotal=100
store.redis.database=0
store.redis.password=
store.redis.queryLimit=100

#Transaction rule configuration, only for the server
server.recovery.committingRetryPeriod=1000
server.recovery.asynCommittingRetryPeriod=1000
server.recovery.rollbackingRetryPeriod=1000
server.recovery.timeoutRetryPeriod=1000
server.maxCommitRetryTimeout=-1
server.maxRollbackRetryTimeout=-1
server.rollbackRetryTimeoutUnlockEnable=false
server.distributedLockExpireTime=10000
server.xaerNotaRetryTimeout=60000
server.session.branchAsyncQueueSize=5000
server.session.enableBranchAsyncRemove=false
server.enableParallelRequestHandle=false

#Metrics configuration, only for the server
metrics.enabled=false
metrics.registryType=compact
metrics.exporterList=prometheus
metrics.exporterPrometheusPort=9898

service.vgroupMapping.default_tx_group 配置内容如下

default

2、新的名称空间seata,分配角色访问权限

image-20250826181241122

1.5、启动seata-server服务

cd /usr/local/seata-server-1.6/bin
./seata-server.sh #或者
./seata-server.sh -m db  

启动参数 
-h 主机名地址 
-p 端口
-m 存储模式默认file,支持db、redis等
-n 节点, 默认1
-e 环境 ,默认无

浏览器访问seata控制台 (http://ip:7091) ,seata-server 会使用端口:7091、8091

http://47.121.215.73:7091/

输入默认账号/密码(seata /seata)登录即可

image-20250827092212549

seata控制台首页

image-20250827092421123

二、客户端接入(springcloud项目)

2.1、项目pom.xml中引入依赖

<!-- seata 接入-->
        <dependency>
            <groupId>com.alibaba.cloud</groupId>
            <artifactId>spring-cloud-starter-alibaba-seata</artifactId>
            <version>2021.0.4.0</version>
        </dependency>
        <dependency>
            <groupId>io.seata</groupId>
            <artifactId>seata-serializer-kryo</artifactId>
            <version>1.5.2</version>
        </dependency>

2.2、项目application.yml配置

seata:
  enabled: true
  application-id: rmccloud-server-biz #应用名称,一般配置为与 ${spring.application.name}相同即可
  enable-auto-data-source-proxy: false #使用了baomidou多数据源则配置为false,单数据源则配置为true
  tx-service-group: default_tx_group
  service:
    vgroup-mapping:
      default_tx_group: default
  registry:
    type: nacos  #注册中心 nacos
    nacos:
      application: seata-server
      server-addr: localhost:8848
      namespace: seata
      group: DEFAULT_GROUP
      username: riskmage
      password: zQsZFHx*s^
  config:
    type: nacos # 配置中心 nacos
    nacos:
      server-addr: localhost:8848
      namespace: seata
      group: DEFAULT_GROUP
      data-id: seataServer.properties
      username: riskmage
      password: zQsZFHx*s^

2.3、多数据源配置(如使用了baomidou多数据源)

spring:  
   datasource:
    #配置hikari连接池
    hikari:
      minimum-idle: 5 #最小连接数
      maximum-pool-size: 10  #池中最大连接数
      connection-timeout: 20000 #连接超时时间
      idle-timeout: 30000 # 空闲等待时间 ms
      max-lifetime: 1800000 #30分钟 
    #动态数据源配置
    dynamic:
      primary: business
      strict: true   #接入seata需要此参数
      seata: true    #接入seata需要此参数
      seata-mode: AT #接入seata需要此参数
<!-- 实现对dynamic-datasource的自动化配置, 版本需升级到3.5.1及以上  -->
        <dependency>
            <groupId>com.baomidou</groupId>
            <artifactId>dynamic-datasource-spring-boot-starter</artifactId>
            <version>3.5.1</version>
        </dependency>

2.4、配置seata的XID请求头拦截器

import feign.RequestInterceptor;
import feign.RequestTemplate;
import io.seata.core.context.RootContext;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class SeataFeignRequestInterceptor implements RequestInterceptor {

    @Override
    public void apply(RequestTemplate template) {
        String xid = RootContext.getXID();
        if (StringUtils.isNotBlank(xid)) {
            template.header(RootContext.KEY_XID, xid);
            log.debug("Seata XID {} added to Feign request header", xid);
        }
    }
}

2.6、新增undo_log表

接入seata的客户端服务的数据库表中,需要新增undo_log日志表

CREATE TABLE `undo_log` (
  `branch_id` bigint NOT NULL COMMENT 'branch transaction id',
  `xid` varchar(128) NOT NULL COMMENT 'global transaction id',
  `context` varchar(128) NOT NULL COMMENT 'undo_log context,such as serialization',
  `rollback_info` longblob NOT NULL COMMENT 'rollback info',
  `log_status` int NOT NULL COMMENT '0:normal status,1:defense status',
  `log_created` datetime(6) NOT NULL COMMENT 'create datetime',
  `log_modified` datetime(6) NOT NULL COMMENT 'modify datetime',
  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci COMMENT='AT transaction mode undo table'

三、全局异常处理器改造

rmccloud-baseserver-web项目 GlobalExceptionHandler.java

package com.riskmage.rmccloud.baseserver.web.exception;


import com.riskmage.rmcbase.BusinessException;
import com.riskmage.rmcbase.Resp;
import com.riskmage.rmccloud.baseserver.base.exception.DistributedTransactionException;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.springframework.validation.BindException;
import org.springframework.validation.ObjectError;
import org.springframework.web.HttpRequestMethodNotSupportedException;
import org.springframework.web.bind.MethodArgumentNotValidException;
import org.springframework.web.bind.annotation.ControllerAdvice;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpServletRequest;
import javax.validation.ConstraintViolation;
import javax.validation.ConstraintViolationException;
import java.util.List;

/**
 * 全局异常处理器
 */
@ControllerAdvice
@ResponseBody
@Slf4j
public class GlobalExceptionHandler {

    /**
     * JSR303 异常
     * @param e
     * @param request
     * @return
     */
    @ExceptionHandler({BindException.class})
    public Resp<?> handleBindException(BindException e, HttpServletRequest request) {
        log.error(e.getMessage());//记录完整错误信息
        List<ObjectError> errors = e.getBindingResult().getAllErrors();
        ObjectError err= errors.get(0);
        String msg = err.getDefaultMessage();
        return  Resp.failure("999999",msg);
    }
    /**
     * JSR303 异常
     * @param e
     * @param request
     * @return
     */
    @ExceptionHandler({MethodArgumentNotValidException.class})
    public Resp<?> handleMethodArgumentNotValidException(MethodArgumentNotValidException e, HttpServletRequest request) {
        log.error(e.getMessage());//记录完整错误信息
        List<ObjectError> errors = e.getBindingResult().getAllErrors();
        ObjectError err= errors.get(0);
        String msg = err.getDefaultMessage();
        return  Resp.failure("999999",msg);
    }
    /**
     * JSR303 异常
     * @param e
     * @param request
     * @return
     */
    @ExceptionHandler({ConstraintViolationException.class})
    public Resp<?> handleConstraintViolationExceptionException(ConstraintViolationException e, HttpServletRequest request) {
        log.error(e.getMessage());
        ConstraintViolation c  = (ConstraintViolation)e.getConstraintViolations().toArray()[0];
        String msg =c.getMessage();
        return  Resp.failure("999999",msg);
    }

    /**
     * BusinessException 自定义业务异常处理
     * @param e
     * @param request
     * @return
     */
    @ExceptionHandler({BusinessException.class})
    public Resp<?> handleBusinessException(BusinessException e, HttpServletRequest request) {
        log.error(e.getMsg());
        // 检查是否在分布式事务上下文中
        String xid = request.getHeader("TX_XID");
        if (StringUtils.isNotEmpty(xid)) {
            log.error("handleBusinessException得到TX_XID:{}",xid);
            throw new DistributedTransactionException(e.getMsg(), e);
        }
        return new Resp<>(e.getCode(), e.getMsg(), e.getData());
    }

    /**
     * Exception 异常
     * @param e
     * @param request
     * @return
     */
    @ExceptionHandler({Exception.class})
    public Resp<?> handleException(Exception e, HttpServletRequest request) {
        log.error(e.getMessage(),e);

        // 检查是否在分布式事务上下文中
        String xid = request.getHeader("TX_XID");
        if (StringUtils.isNotEmpty(xid)) {
            log.error("捕获到分布式事务中的异常:{}",e.getMessage());
            throw new DistributedTransactionException(e);
        }
        if(e instanceof HttpRequestMethodNotSupportedException){
           return Resp.failure("999998","客户端http请求方式有误,请检查!");
        }
        return Resp.failure("999997","抱歉,服务器繁忙请稍候再试!");
    }

    // 处理分布式事务相关异常 - 不捕获,直接抛出
    @ExceptionHandler(DistributedTransactionException.class)
    public void handleDistributedTransactionException(DistributedTransactionException e) throws DistributedTransactionException {
        log.error("分布式事务异常: {}", e.getMessage());
        throw e;
    }
}

新增DistributedTransactionException 自定义分布式事务异常类

package com.riskmage.rmccloud.baseserver.base.exception;

/**
 * 自定义异常 (分布式事务异常)
 */
public class DistributedTransactionException extends RuntimeException {
    public DistributedTransactionException() {
        super();
    }

    public DistributedTransactionException(String message) {
        super(message);
    }

    public DistributedTransactionException(String message, Throwable cause) {
        super(message, cause);
    }
}

四、seata分布式事务案例

详情见 rmccloud-pc 、rmccloud-server-api 、rmccloud-server-biz 的seatademo模块代码(分支:feature-seata集成)

请求接口:

http://localhost:8032/demoOrder/createOrder?goodsId=1&num=1

http://localhost:8032/demoOrder/createOrder?goodsId=2&num=101

http://localhost:8032/demoOrder/createOrder?goodsId=5&num=1

image-20250827180310569

seata的AT模式 会操作客户端服务数据库的undo_log表。 由于undo_log表数据在分布式结束后会立即删除,不太好断点调试(seata超时则事务回滚结束)查看undo_log表数据, 我们可以事后查看mysql binlog来验证seata是否有对undo_log表进行插入和删除操作。

# 查看mysql某个db的某个表的binlog
mysqlbinlog    --base64-output=DECODE-ROWS -v  --database=数据库名   binlog文件 | grep -A 20 -B 5 "表名称"

# 查看rmccloud_base的undo_log表的binlog
mysqlbinlog    --base64-output=DECODE-ROWS -v  --database=rmccloud_base   binlog.000034 | grep -A 20 -B 5 "undo_log"

mysql表的binlog (undo_log表)

# at 36737332
#250828  9:59:22 server id 1  end_log_pos 36737415 CRC32 0x22c302c7     Table_map: `rmccloud_base`.`undo_log` mapped to number 820
# at 36737415
#250828  9:59:22 server id 1  end_log_pos 36738046 CRC32 0x5dfc93a4     Write_rows: table id 820 flags: STMT_END_F
### INSERT INTO `rmccloud_base`.`undo_log`
### SET
###   @1=7485670342865145861
###   @2='192.168.30.1:8091:7485670342865145859'
###   @3='serializer=kryo&compressorType=NONE'
###   @4='-\x01<8a>ÀºÂ<83>á¸âÏ\x19\x01\x01\x01\x00io.seata.rm.datasource.undo.SQLUndoLoç\x01\x01\x01io.seata.rm.datasource.sql.struct.TableRecordó\x01\x19\x01\x01\x01\x02io.seata.rm.datasource.sql.struct.Ro÷\x01\x19\x01\x05\x01\x03io.seata.rm.datasource.sql.struct.Fielä\x01\x01\x01\x01create_timåº\x01\x01\x04java.time.LocalDateTimå\x01é\x0f\b\x1c\t;é\x01\x03\x01\n\x01goods_iä\t\t\x02\x01\x03\x01\n\x01order_codå\x18\x03\x01aada789793c742ce868f15896afdd35³\x01\x03\x01\x01\x02\x01order_iä\t\t<84>ÀÉü¥<9a>»¶6\x01\x03\x01\n\x01purchase_nuí\b\x02\x02\x01demo_ordeò\x01\x05Á\x01io.seata.rm.datasource.sql.struct.TableRecords$EmptyTableRecords\x01\x19\x01\x00\x17\x01\x02\x01demo_ordeò\x01192.168.30.1:8091:748567034286514585¹'
###   @5=0
###   @6='2025-08-28 09:59:22.586541'
###   @7='2025-08-28 09:59:22.586541'
# at 36738046
#250828  9:59:22 server id 1  end_log_pos 36738077 CRC32 0x83f77f26     Xid = 3274698
COMMIT/*!*/;
# at 36738077
#250828  9:59:23 server id 1  end_log_pos 36738156 CRC32 0x509ccf79     Anonymous_GTID  last_committed=64353    sequence_number=64354   rbr_only=yes    original_committed_timestamp=1756346363229130   immediate_commit_timestamp=1756346363229130     transaction_length=898
/*!50718 SET TRANSACTION ISOLATION LEVEL READ COMMITTED*//*!*/;
# original_commit_timestamp=1756346363229130 (2025-08-28 09:59:23.229130 CST)
# immediate_commit_timestamp=1756346363229130 (2025-08-28 09:59:23.229130 CST)
/*!80001 SET @@session.original_commit_timestamp=1756346363229130*//*!*/;
/*!80014 SET @@session.original_server_version=80021*//*!*/;
/*!80014 SET @@session.immediate_server_version=80021*//*!*/;
SET @@SESSION.GTID_NEXT= 'ANONYMOUS'/*!*/;
--
#250828  9:59:23 server id 1  end_log_pos 36739138 CRC32 0x8da3b997     Query   thread_id=34654 exec_time=0     error_code=0
SET TIMESTAMP=1756346363/*!*/;
BEGIN
/*!*/;
# at 36739138
#250828  9:59:23 server id 1  end_log_pos 36739221 CRC32 0xe3cb3b8e     Table_map: `rmccloud_base`.`undo_log` mapped to number 820
# at 36739221
#250828  9:59:23 server id 1  end_log_pos 36739852 CRC32 0x6d524113     Delete_rows: table id 820 flags: STMT_END_F
### DELETE FROM `rmccloud_base`.`undo_log`
关键字:  seata
评论信息
暂无评论
发表评论

亲,您还没有登陆,暂不能评论哦! 去 登陆 | 注册

博主信息
   
数据加载中,请稍候...
文章分类
   
数据加载中,请稍候...
阅读排行
 
数据加载中,请稍候...
评论排行
 
数据加载中,请稍候...

Copyright © 叮叮声的奶酪 版权所有
备案号:鄂ICP备17018671号-1

鄂公网安备 42011102000739号