cockroachdb / cockroachdb/cockroach

kvnemesis: inject clock skew to test linearizability

Open
#97,453 0 comments 0 reactions 0 assignees View on GitHub
A-testing O-qa quality-friday T-kv
Dominant language
Go
Stars
32.5k
Forks
4.1k
PR merge metrics
PR metrics pending

Description

Currently, kvnemesis runs a set of nodes on the local machine. These will all be using the same system clock, and thus have 0 clock skew. This prevents kvnemesis from testing single-key linearizability, an important database guarantee. We should inject random clock skew on these nodes up to MaxOffset.

In particular, it should catch bugs like #97443.

Jira issue: CRDB-24707

Contributor guide

Open the contributing guide

Research direction

Start by locating kvnemesis and the MaxOffset definition, then read issue #97443 to understand the linearizability failure this should expose. Implementing this requires understanding how kvnemesis starts its local nodes and controls their clocks. Done means nodes receive random clock skew up to MaxOffset and the test can exercise single-key linearizability under that skew.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
databases, distributed-systems, testing-qa
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.