首页 > 解决方案 > 计算机科学中共识和交易之间的关系是什么?

问题描述

wiki 上的一句话让我很困惑,声称 2pc 是一种特殊的共识。

两阶段提交协议

In transaction processing, databases, and computer networking, the two-phase commit protocol (2PC) is a type of atomic commitment protocol (ACP). It is a distributed algorithm that coordinates all the processes that participate in a distributed atomic transaction on whether to commit or abort (roll back) the transaction (it is a specialized type of consensus protocol)

据我所知,共识旨在在系统的不同方面决定一个变量的值,而交易可能会确保多个变量的值。如果我是对的,那么共识算法应该是交易的一个子集。为什么相反??

标签: transactionsconsistencyconsensus

解决方案


推荐阅读