Skip to main content

implement-optimistic-concurrency-control

Implement optimistic concurrency control with version identity, conditional writes, conflict semantics, retries, merge policy, and user recovery. Use when concurrent updates must not silently overwrite one another.

소스 정보

저장소
protosphinx/sphinxstack
최근 소스 활동
2026년 7월 29일 13:55
감지된 SKILL.md 언어
영어
스타
3
포크
0

설치 방법

기본적으로 소스를 먼저 확인하는 Prompt가 선택됩니다. 직접 명령으로 전환하거나 로컬 사본을 다운로드할 수도 있습니다.

소스 파일 검토

설치 여부를 결정하기 전에 SKILL.md와 SkillsMP에 표시된 보조 파일을 읽어 보세요.

파일 탐색기
2 개 파일

SKILL.md 표시 중

SKILL.md
소스 지침 · 읽기 전용 미리보기
name
implement-optimistic-concurrency-control
category
code
description
Implement optimistic concurrency control with version identity, conditional writes, conflict semantics, retries, merge policy, and user recovery. Use when concurrent updates must not silently overwrite one another.
# implement-optimistic-concurrency-control ## When to use - Use where contention is bounded and lost updates are unacceptable. - Do not automatically retry noncommutative or externally side-effecting updates. ## Preconditions - Define entity, invariants, version source, operations, conflict rate, merge authority, and clients. ## Procedure 1. Choose monotonic version, ETag, compare value, or database-native token. 2. Return the version with every readable representation. 3. Require the expected version in each mutation and update atomically. 4. Return a structured conflict with current version and safe reconciliation data. 5. Retry only operations proven idempotent and commutative. 6. Test simultaneous create, update, delete, batch, stale cache, and side effects. ## Failure plan - Route semantic conflicts to explicit user or domain resolution. ## Worked example Two editors change a policy; the second write receives a conflict rather than erasing the first. ## Done - A concurrency implementation records version contract, atomic update, conflict response, retry, merge, and telemetry - Simultaneous, stale, delete, batch, idempotency, side-effect, cache, and user-recovery tests verify correctness
GitHub에서 보기