apache / incubator-seata

:fire: Seata is an easy-to-use, high-performance, open source distributed transaction solution.
https://seata.apache.org/
Apache License 2.0
25.25k stars 8.77k forks source link

The distribute lock table is not config, please create the target table and config it #6587

Closed a8159236 closed 4 months ago

a8159236 commented 4 months ago

1、seata-server 2.x配置nacos的时候配置文件里面只要写这三张表吗,我看官方的文档里只配置了这三张表,但是数据库模板里还有一个distributed_lock表不需要配置吗? 9326a1c672af01cb5805e5e8907913f 8cf482fb9fcb8290550714025998bee

2、配置的话需要加个参数store.db.distributedLockTable=distributed_lock是否有影响,不加的话日志这边有个报错有影响吗? b7328e363dfae8792ae6708a8428bfe

funky-eyes commented 4 months ago

https://github.com/apache/incubator-seata/blob/2.x/script/server/db/mysql.sql 根据这里来建表

a8159236 commented 4 months ago

https://github.com/apache/incubator-seata/blob/2.x/script/server/db/mysql.sql 根据这里来建表

我将mysql.sql导入了我的seata数据中一共是四张表 image 但是nacos中的shuj数据库该如何配置?

是要配置四张表: store.db.globalTable=global_table store.db.branchTable=branch_table store.db.distributedLockTable=distributed_lock store.db.lockTable=lock_table

还是按照官方文档配置三张表就行: store.db.globalTable=global_table store.db.branchTable=branch_table store.db.lockTable=lock_table

a8159236 commented 4 months ago

https://seata.apache.org/zh-cn/docs/ops/deploy-by-docker-compose/ 我使用的是docker-compose的部署方式

a8159236 commented 4 months ago

因为如果我按照官方文档只配置这三个参数: store.db.globalTable=global_table store.db.branchTable=branch_table store.db.lockTable=lock_table 在启动时日志会报错,提示要配置distributed表 企业微信截图_17168587718682 需要添加一行参数store.db.distributedLockTable=distributed_lock才能避免该报错 那么我需要加上这行参数吗?这个加不加有没有什么影响 ?是否可以忽略这个报错?@funky-eyes

funky-eyes commented 4 months ago

这个错不影响运行,如果你不使用分布式锁来做seata-server的任务协调那就不需要这个配置,不过建议还是配上,并且创建对应的表

a8159236 commented 4 months ago

这个错不影响运行,如果你不使用分布式锁来做seata-server的任务协调那就不需要这个配置,不过建议还是配上,并且创建对应的表

好的谢谢