You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@seata.apache.org by "sixlei (via GitHub)" <gi...@apache.org> on 2023/12/26 02:48:15 UTC
[I] 分支回滚的排序只依赖数据库的时间可能会有问题 [incubator-seata]
sixlei opened a new issue, #6215:
URL: https://github.com/apache/incubator-seata/issues/6215
<!-- Please do not use this issue template to report security vulnerabilities but refer to our [security policy](https://github.com/seata/seata/security/policy). -->
- [ ] I have searched the [issues](https://github.com/seata/seata/issues) of this repository and believe that this is not a duplicate.
### Ⅰ. Issue Description
对于单机数据库是没问题的,多个seata节点按顺序插入branch_table表,时间肯定也是固定的。
但是对于分布式数据库,如果分布式数据库有时差问题,最后插入到branch_table表中的时间也会有问题,这样就不能严格保证有序了。回滚的时候乱序回滚会有问题。
这里使用数据库的序列是不是更合理,和seata节点时间、分布式数据库的时间就都没关系了。
- JDK version(e.g. `java -version`): 1.8
- Seata client/server version: 1.4及以上
- Database version: gaussdb分布式数据库
- OS(e.g. `uname -a`):
- Others:
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org
Re: [I] 分支回滚的排序只依赖数据库的时间可能会有问题 [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on issue #6215:
URL: https://github.com/apache/incubator-seata/issues/6215#issuecomment-1869275687
传统数据库和分布式数据库社区都要兼顾,序列不能是事务插入上的一个瓶颈项
Both traditional databases and distributed database communities need to take into account that sequences cannot be a bottleneck on transaction insertion
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org
Re: [I] 分支回滚的排序只依赖数据库的时间可能会有问题 [incubator-seata]
Posted by "sixlei (via GitHub)" <gi...@apache.org>.
sixlei closed issue #6215: 分支回滚的排序只依赖数据库的时间可能会有问题
URL: https://github.com/apache/incubator-seata/issues/6215
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org
Re: [I] 分支回滚的排序只依赖数据库的时间可能会有问题 [incubator-seata]
Posted by "sixlei (via GitHub)" <gi...@apache.org>.
sixlei commented on issue #6215:
URL: https://github.com/apache/incubator-seata/issues/6215#issuecomment-1869231682
想请教下这个当时使用时间排序而不是使用数据库序列是考虑到了什么问题吗。因为有些数据库厂商给的结论是时间做不到100%稳定有序的,可能会因为一些组件挂掉导致时间乱掉,如果用序列的话考虑下来是能规避这个问题的。
Would you like to ask what problems were considered when using time sorting instead of database sequences at that time?Because some database vendors have concluded that time cannot be 100% stable and orderly, it may lead to time disorder due to the failure of some components, which can be avoided by using sequences.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org
Re: [I] 分支回滚的排序只依赖数据库的时间可能会有问题 [incubator-seata]
Posted by "funky-eyes (via GitHub)" <gi...@apache.org>.
funky-eyes commented on issue #6215:
URL: https://github.com/apache/incubator-seata/issues/6215#issuecomment-1869222358
如果是分布式数据库时差问题请反馈给分布式数据库相关社区或厂商,seata没有使用数据库的序列,自带的雪花算法不是全局顺序的,是局部有序的,当然在1.5.2以上按照xid负载均衡的话,这个事务一定是有序的,因为都会注册在同一个tc中。数据库层面seata使用的都是now()这个函数,应该由分布式数据库自行保证时钟问题。
If it is a distribution database time difference problem, please give feedback to the distribution database related community or manufacturer. Seata does not use the database sequence. The snowflake algorithm that comes with it is not globally ordered, but locally ordered. Of course, according to xid load balancing above 1.5.2, this transaction must be orderly, because it will be registered in the same tc. The database level seata uses the now () function, and the distribution database should guarantee the clock problem by itself.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@seata.apache.org
For additional commands, e-mail: dev-help@seata.apache.org