Conflict-Free Replicated Data Types (CRDTs) are used in a range of fields for their coordination-free replication with strong eventual consistency. By prioritising availability over consistency under partition, nodes accumulate events in different orders, and rely on an associative, commutative and idempotent merge function to present a materialised view of the CRDT. Under some circumstances, the state of the materialised view over time can appear to ''roll back'' previously applied events. When the materialised view is used to manage group permissions such as ones found in instant messaging applications, this can lead to surprising behaviour. This can occur when there are multiple concurrent events, such as in the Duelling Admins problem where two equally permissioned admins concurrently revoke each other's permissions. Who wins? This article argues that a Byzantine admin can exploit concurrency to win the duel. As a result, an external arbiter is required to arbitrate an immutable happens-before relation between concurrent events. Arbitration occurs asynchronously in batches via optional ''epoch events'', preserving availability. This introduces a bounded total order within epochs, and the resulting ''finality'' improves on the level of consistency CRDTs can provide.
翻译:无冲突复制数据类型(CRDTs)因其具备强最终一致性的无协调复制特性,在多个领域得到广泛应用。通过在分区情况下优先保证可用性而非一致性,各节点以不同顺序累积事件,并依赖满足结合律、交换律和幂等性的合并函数来呈现CRDT的具体化视图。在某些情况下,具体化视图随时间变化的状态可能表现出对先前应用事件的“回滚”现象。当该具体化视图用于管理群组权限(例如即时通讯应用中的权限体系)时,可能导致异常行为。这种现象常出现在多并发事件场景中,例如“决斗管理员”问题中两个权限对等的管理员同时撤销对方权限的情况。最终谁能胜出?本文论证了拜占庭管理员可利用并发性赢得决斗。因此,需要引入外部仲裁器为并发事件建立不可变的先后关系进行仲裁。仲裁通过可选的“纪元事件”以异步批处理方式执行,从而保持系统可用性。该方法在纪元内部建立了有界全序关系,由此产生的“终局性”提升了CRDT所能提供的一致性级别。