claude_md/code_review.md
This document defines the methodology for performing thorough, multi-perspective code reviews on RocksDB changes. It is used both by CI (GitHub Actions) and local review workflows.
Before starting a review:
CLAUDE.md in the repository root for project-specific guidelinesclaude_md/ for architecture contextConduct the review from multiple perspectives, then synthesize findings into a single report. Each perspective catches different classes of bugs.
Before reviewing the diff itself, build deep context:
Check the change in ALL execution contexts:
| Context | Key difference |
|---|---|
| WritePreparedTxnDB | read_callback_ controls visibility |
| ReadOnly DB / SecondaryInstance | No mutable memtable |
| CompactionService / Remote compaction | Different process |
| User-defined timestamps | Extra key comparison dimension |
| MemPurge | Memtable-to-memtable path |
| BlobDB | Values in blob files, not inline |
| Old snapshots | Seqno far behind current |
| Concurrent writers | Lock-free vs locked paths |
| FIFO / Universal compaction | Different invariants |
| Prefix seek / total order seek | Different iterator behavior |
When the change claims a property ("logically redundant", "safe because X"), systematically try to break it: list preconditions, construct counterexamples.
RocksDB is a high-performance storage engine.
Use available tools to explore deeply — do NOT just review the diff in isolation. The most critical bugs hide at component boundaries.
Brief overall assessment (1-2 sentences).
Categorize by severity:
For each issue include:
Execution context checks and assumption stress-test results.
Good patterns, clever optimizations, or improvements.