根据 Oracle 文档,COMMIT_POINT_STRENGTH 是决定分布式事务提交的影响的参数?我的应用程序中有 2 个数据库节点,并且两个节点中的 COMMIT_POINT_STRENGTH 都设置为 1。如果我从一个节点为两个节点中都存在的表启动事务(通过同义词)。如果另一个节点未能提交数据,事务会发生什么?
1 回答
First off: COMMIT_POINT_STRENGTH is not the parameter which determines the impact of the commit of a distributed transaction. The docs say:
It specifies a value that determines the commit point site in a distributed transaction. The node in the transaction with the highest value for COMMIT_POINT_STRENGTH
will be the commit point site.
[...]
The commit point site stores information about the status of transactions. Other computers in a distributed transaction require this information during Oracle's two-phase commit, so it is desirable to have machines that are always available as commit point sites.
So given that the communication between the nodes is intact, the answer to your question "What happens to the transaction, if other node fails to commit data?" is independent of COMMIT_POINT_STRENGTH
and follows Oracle's two-phase commit: the transaction is rolled back at both nodes.