Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Quick Start documentation uses ext field not mentioned in MySQL configuration template #6346

Closed
1 task done
linghengqian opened this issue Feb 16, 2024 · 2 comments · Fixed by apache/incubator-seata-website#835
Assignees

Comments

@linghengqian
Copy link
Member

  • I have searched the issues of this repository and believe that this is not a duplicate.

Ⅰ. Issue Description

-- 注意此处0.3.0+ 增加唯一索引 ux_undo_log
CREATE TABLE `undo_log` (
  `id` bigint(20) NOT NULL AUTO_INCREMENT,
  `branch_id` bigint(20) NOT NULL,
  `xid` varchar(100) NOT NULL,
  `context` varchar(128) NOT NULL,
  `rollback_info` longblob NOT NULL,
  `log_status` int(11) NOT NULL,
  `log_created` datetime NOT NULL,
  `log_modified` datetime NOT NULL,
  `ext` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `ux_undo_log` (`xid`,`branch_id`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
-- for AT mode you must to init this sql for you business database. the seata server not need it.
CREATE TABLE IF NOT EXISTS `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(11)      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 AUTO_INCREMENT = 1 DEFAULT CHARSET = utf8mb4 COMMENT ='AT transaction mode undo table';
ALTER TABLE `undo_log` ADD INDEX `ix_log_created` (`log_created`);

Ⅱ. Describe what happened

  • Null.

Ⅲ. Describe what you expected to happen

  • Possible documentation updates or template updates.

Ⅳ. How to reproduce it (as minimally and precisely as possible)

  1. Open https://seata.apache.org/docs/user/quickstart/#step-2-create-undo_log-table .
  2. Open https://github.com/apache/incubator-seata/blob/v2.0.0/script/client/at/db/mysql.sql .
  3. Open https://github.com/apache/incubator-seata/blob/2.x/script/client/at/db/mysql.sql .

Minimal yet complete reproducer code (or URL to code):

  • Null.

Ⅴ. Anything else we need to know?

  • Null.

Ⅵ. Environment:

  • JDK version(e.g. java -version):
openjdk version "21.0.2" 2024-01-16
OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30)
OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)
  • Seata client/server version: 2.0.0
  • Database version: MySQL Server 8.3.0
  • OS(e.g. uname -a): Linux DESKTOP-J7M76VH 5.15.133.1-microsoft-standard-WSL2 #1 SMP Thu Oct 5 21:02:42 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Others: Null
@slievrly
Copy link
Member

@linghengqian Thank you for your feedback, I will trace this issue.

@slievrly
Copy link
Member

The table structure here should not include the 'ext' field. For the AT mode's 'undo_log' table, please refer to the scripts for each version, which can be specifically found at: https://github.com/apache/incubator-seata/tree/${version}/script/client/at/db. We will reorganize the quick start documentation on the official website. Thank you very much for your feedback.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants