# 【etcd】Txn 与并发语义：compare/mod 与 Jepsen 边界

DevFeed: [【etcd】Txn 与并发语义：compare/mod 与 Jepsen 边界](<https://devfeed.tech/articles/etcd-txn-compare-mod-jepsen-33993.md>)

Original publisher: [Read original article](<https://quant67.com/post/etcd/11-txn-semantics/11-txn-semantics.html>)

Author: Liao Tonglang

Published: 2026-08-26T00:00:00Z

Content type: tutorial

Language: zh

Sources: [土法炼钢 - 系统与基础设施](<https://devfeed.tech/sources/source-4.md>)

Topics: [etcd](<https://devfeed.tech/topics/etcd.md>), [version](<https://devfeed.tech/topics/version.md>), [Raft](<https://devfeed.tech/topics/raft.md>), [API](<https://devfeed.tech/topics/api.md>)

Tags: [bug](<https://devfeed.tech/tags/bug.md>), [compare](<https://devfeed.tech/tags/compare.md>), [concurrency](<https://devfeed.tech/tags/concurrency.md>), [distributed](<https://devfeed.tech/tags/distributed.md>), [etcd](<https://devfeed.tech/tags/etcd.md>), [jepsen](<https://devfeed.tech/tags/jepsen.md>), [kubernetes](<https://devfeed.tech/tags/kubernetes.md>), [mvcc](<https://devfeed.tech/tags/mvcc.md>), [raft](<https://devfeed.tech/tags/raft.md>), [serializable](<https://devfeed.tech/tags/serializable.md>), [txn](<https://devfeed.tech/tags/txn.md>), [v3-5](<https://devfeed.tech/tags/v3-5.md>), [v3-5-33](<https://devfeed.tech/tags/v3-5-33.md>), [version](<https://devfeed.tech/tags/version.md>)

## AI overview

This article examines etcd v3.5.33 transaction semantics, including compare operations, nested transactions, MVCC visibility, ReadIndex behavior, and Raft-based atomic application. It distinguishes the design goals of the KV transaction path from the Lease session-lock path and carefully limits Jepsen evidence to etcd 3.4.3 rather than claiming an independent 3.5.33 rerun.

## Source excerpt

钉 etcd v3.5.33 Txn 的 compareToPath、MOD/CREATE/VERSION 比较与写 Txn 的 Raft 单槽 apply，并对照 Jepsen 3.4.3 的 strict-serializable 与 Lease 锁不安全子集。