-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
add documentation for tidb_enable_amend_pessimistic_txn. #4979
add documentation for tidb_enable_amend_pessimistic_txn. #4979
Conversation
add documentation for tidb_enable_amend_pessimistic_txn.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
It seems that the vars listed in this doc is in alphabetical order, thus we may need to prepose this one?
Thanks for reminding, I didn't notice it but just follow the implemetation order. |
system-variables.md
Outdated
|
||
- 作用域:SESSION | GLOBAL | ||
- 默认值: 0 | ||
- 这个变量用于控制是否开启 `AMEND TRANSACTION` 特性。开启该特性之后,在[悲观事务模式](/pessimistic-transaction.md)下,事务两阶段提交之前,如果该事务相关的表存在并发 DDL 操作和 SCHEMA VERSION 变更,TiDB 会尝试对于该事务进行 amend 操作修正该事务提交内容,使其和最新有效的 SCHEMA VERSION 保持一致,进而提交该事务而不返回 `Information schema is changed` 报错。该特性对于如下并发 DDL 变更生效: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 这个变量用于控制是否开启 `AMEND TRANSACTION` 特性。开启该特性之后,在[悲观事务模式](/pessimistic-transaction.md)下,事务两阶段提交之前,如果该事务相关的表存在并发 DDL 操作和 SCHEMA VERSION 变更,TiDB 会尝试对于该事务进行 amend 操作修正该事务提交内容,使其和最新有效的 SCHEMA VERSION 保持一致,进而提交该事务而不返回 `Information schema is changed` 报错。该特性对于如下并发 DDL 变更生效: | |
- 这个变量用于控制是否开启 `AMEND TRANSACTION` 特性。开启该特性之后,在[悲观事务模式](/pessimistic-transaction.md)下,事务两阶段提交之前,如果该事务相关的表存在并发 DDL 操作和 SCHEMA VERSION 变更,TiDB 会尝试对于该事务进行 amend 操作修正该事务的提交内容,使其和最新有效的 SCHEMA VERSION 保持一致,进而成功提交该事务而不返回 `Information schema is changed` 报错。该特性对于如下并发 DDL 变更生效: |
system-variables.md
Outdated
- 这个变量用于控制是否开启 `AMEND TRANSACTION` 特性。开启该特性之后,在[悲观事务模式](/pessimistic-transaction.md)下,事务两阶段提交之前,如果该事务相关的表存在并发 DDL 操作和 SCHEMA VERSION 变更,TiDB 会尝试对于该事务进行 amend 操作修正该事务提交内容,使其和最新有效的 SCHEMA VERSION 保持一致,进而提交该事务而不返回 `Information schema is changed` 报错。该特性对于如下并发 DDL 变更生效: | ||
|
||
- add/drop column 类型的 DDL 操作。 | ||
- modify/change column 类型的 DDL 操作。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm afraid we cannot support type changing for now
@jackysp, @zyguan, @you06, @MyonKeminta, @coocood, PTAL. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@jackysp, @zyguan, @you06, @MyonKeminta, @coocood, PTAL. |
@cfzjywxk, please update your pull request. |
@jackysp, @zyguan, @you06, @MyonKeminta, @coocood, PTAL. |
@cfzjywxk, please update your pull request. |
system-variables.md
Outdated
|
||
- 作用域:SESSION | GLOBAL | ||
- 默认值: 0 | ||
- 这个变量用于控制是否开启 `AMEND TRANSACTION` 特性。开启该特性之后,在[悲观事务模式](/pessimistic-transaction.md)下,事务两阶段提交之前,如果该事务相关的表存在并发 DDL 操作和 SCHEMA VERSION 变更,TiDB 会尝试对于该事务进行 amend 操作修正该事务的提交内容,使其和最新有效的 SCHEMA VERSION 保持一致,进而成功提交该事务而不返回 `Information schema is changed` 报错。该特性对于如下并发 DDL 变更生效: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 这个变量用于控制是否开启 `AMEND TRANSACTION` 特性。开启该特性之后,在[悲观事务模式](/pessimistic-transaction.md)下,事务两阶段提交之前,如果该事务相关的表存在并发 DDL 操作和 SCHEMA VERSION 变更,TiDB 会尝试对于该事务进行 amend 操作修正该事务的提交内容,使其和最新有效的 SCHEMA VERSION 保持一致,进而成功提交该事务而不返回 `Information schema is changed` 报错。该特性对于如下并发 DDL 变更生效: | |
- 这个变量用于控制是否开启 `AMEND TRANSACTION` 特性。在[悲观事务模式](/pessimistic-transaction.md)下开启该特性后,如果该事务相关的表存在并发 DDL 操作和 SCHEMA VERSION 变更,TiDB 会尝试对该事务进行 amend 操作,修正该事务的提交内容,使其和最新的有效 SCHEMA VERSION 保持一致,从而成功提交该事务而不返回 `Information schema is changed` 报错。该特性对以下并发 DDL 变更生效: |
system-variables.md
Outdated
- add/drop column 类型的 DDL 操作。 | ||
- modify/change column 类型的 DDL 操作,只对增大字段长度生效。 | ||
- add/drop index 类型的 DDL 操作,且操作的索引列不是在事务开启之后新创建。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- add/drop column 类型的 DDL 操作。 | |
- modify/change column 类型的 DDL 操作,只对增大字段长度生效。 | |
- add/drop index 类型的 DDL 操作,且操作的索引列不是在事务开启之后新创建。 | |
- `ADD COLUMN` 或 `DROP COLUMN` 类型的 DDL 操作。 | |
- `MODIFY COLUMN` 或 `CHANGE COLUMN` 类型的 DDL 操作,且只对增大字段长度的操作生效。 | |
- `ADD INDEX` 或 `DROP INDEX` 类型的 DDL 操作,且操作的索引列须在事务开启之前创建。 |
system-variables.md
Outdated
- modify/change column 类型的 DDL 操作,只对增大字段长度生效。 | ||
- add/drop index 类型的 DDL 操作,且操作的索引列不是在事务开启之后新创建。 | ||
|
||
目前该特性可能造成事务语义的变化,且与 TiDB Binlog 存在部分兼容的场景,可以参考[事务语义行为区别](https://github.com/pingcap/tidb/issues/21069)和[与 Binlog 兼容问题汇总](https://github.com/pingcap/tidb/issues/20996)了解更多关于该特性的使用注意事项。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前该特性可能造成事务语义的变化,且与 TiDB Binlog 存在部分兼容的场景,可以参考[事务语义行为区别](https://github.com/pingcap/tidb/issues/21069)和[与 Binlog 兼容问题汇总](https://github.com/pingcap/tidb/issues/20996)了解更多关于该特性的使用注意事项。 | |
目前该特性可能造成事务语义的变化,且与 TiDB Binlog 存在部分不兼容的场景,可以参考[事务语义行为区别](https://github.com/pingcap/tidb/issues/21069)和[与 TiDB Binlog 兼容问题汇总](https://github.com/pingcap/tidb/issues/20996)了解更多关于该特性的使用注意事项。 |
@cfzjywxk I tried to refine the language in my comments. PTAL whether they are technically correct, thanks! |
@cfzjywxk, please update your pull request. |
Address comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
cherry pick to release-4.0 in PR #5075 |
* cherry pick #4979 to release-4.0 Signed-off-by: ti-srebot <ti-srebot@pingcap.com> * Apply suggestions from code review Co-authored-by: cfzjywxk <lsswxr@163.com> Co-authored-by: TomShawn <41534398+TomShawn@users.noreply.github.com>
add documentation for tidb_enable_amend_pessimistic_txn.
First-time contributors' checklist
What is changed, added or deleted? (Required)
Add documentation about the system variable introduced by the new feature and the related project
Which TiDB version(s) do your changes apply to? (Required)
What is the related PR or file link(s)?
Do your changes match any of the following descriptions?