Skip to content

docs: document the atomic-mode side effects on non-CAS writes (#399) - #762

Merged
s2x merged 5 commits into
masterfrom
docs/issue-399-doc-33-document-the-atomic-mode-side-eff
Oct 24, 2026
Merged

s2x merged 5 commits into
masterfrom
docs/issue-399-doc-33-document-the-atomic-mode-side-eff

Conversation

@s2x

@s2x s2x commented Oct 24, 2026

Copy link
Copy Markdown
Member

Description

Closes #399

The docs did not say that setAtomicForCAS(true) changes the write path of every put and delete of the client instance, and they gave no guidance for mixed writers.

Changes

  • README.md: scope of the flag — put(), delete(), batchPut(), batchDelete() send for_cas; compareAndSwap() and putIfAbsent() require the flag; deleteRange(), deletePrefix() and ingest() do not send it.
  • docs/operations.md: Atomic Mode scope list, "Mixed writers" paragraph with the reason (TiKV latches atomic writes and CAS, a plain write takes no latch, so it can land between the CAS read and write), CAS prerequisite note.
  • docs/helpers/decisions.md: entry with the TiKV source references (src/server/service/kv.rs, src/storage/mod.rs, src/storage/txn/commands/).
  • CHANGELOG.md: entry under [Unreleased] / ### Fixed.

Testing

Documentation only. The client claims were checked in src/Client/RawKv; the TiKV claims were checked in tikv/tikv master by the coder and the reviewer.

Code Review

  • Reviewed by an independent review agent (3 rounds, final: "Code looks good, no issues to fix.")

@s2x s2x self-assigned this Oct 24, 2026
…33-document-the-atomic-mode-side-eff

# Conflicts:
#	CHANGELOG.md
#	docs/helpers/decisions.md
@s2x
s2x merged commit 56a63c8 into master Oct 24, 2026
11 checks passed
@s2x
s2x deleted the docs/issue-399-doc-33-document-the-atomic-mode-side-eff branch October 24, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[DOC-33] Document the atomic-mode side effects on non-CAS writes

1 participant