polardbxoperatordocs/faq/16-transaction-strategy.md

25 lines
643 B
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

事务策略是 CN 的动态参数,如何修改可以参考文档:[《创建数据库参数操作对象》](../ops/configuration/1-cn-variable-load-at-runtime-create-db.md)
## 操作步骤
1. 配置knobs.yaml 如下所示:
```yaml
apiVersion: polardbx.aliyun.com/v1
kind: PolarDBXClusterKnobs
metadata:
name: kunan-oss
spec:
clusterName: "tunan-oss"
knobs:
TRANSACTION_POLICY: XA
```
增加TRANSACTION_POLICY 参数,填写需要的事务策略即可,支持 XA|TSO|TSO_READONLY。
2. 登录CN执行如下SQL检查配置是否生效
```mysql
begin; show variables like "drds_transaction_policy"; rollback;
```