@@ -29,7 +29,7 @@ CockroachDB is a distributed SQL database written in Go, built with Bazel and ma
29
29
./dev test pkg/sql --stress # Run repeatedly until failure
30
30
./dev testlogic # Run all SQL logic tests
31
31
./dev testlogic ccl # Run enterprise logic tests
32
- ./dev testlogic -- files=' prepare|fk' # Run specific test files
32
+ ./dev testlogic base --config=local -- files=' prepare|fk' # Run specific test files under a specific configuration
33
33
```
34
34
35
35
Note that when filtering tests via ` -f ` to include the ` -v ` flag which
@@ -40,8 +40,10 @@ for `testing: warning: no tests to run` in the output.
40
40
``` bash
41
41
./dev generate # Generate all code (protobuf, parsers, etc.)
42
42
./dev generate go # Generate Go code only
43
- ./dev lint # Run all linters
44
- ./dev lint --short # Run fast subset of linters
43
+ ./dev generate bazel # Update BUILD.bazel files when dependencies change
44
+ ./dev generate protobuf # Generate files based on protocol buffer definitions
45
+ ./dev lint # Run all linters (only run this when requested)
46
+ ./dev lint --short # Run fast subset of linters (only run this when requested)
45
47
```
46
48
47
49
### Architecture Overview
@@ -67,20 +69,21 @@ SQL Layer (pkg/sql/) → Distributed KV (pkg/kv/) → Storage (pkg/storage/)
67
69
68
70
### Development Workflow
69
71
70
- 1 . ** Environment Setup** : Run ` ./dev doctor ` to ensure all dependencies are installed
71
- 2 . ** Building** : Use ` ./dev build short ` for iterative development, ` ./dev build cockroach ` for full builds
72
- 3 . ** Testing** : Run package-specific tests with ` ./dev test pkg/[package] `
73
- 4 . ** Code Generation** : After schema/proto changes, run ` ./dev generate go `
74
- 5 . ** Quality Checks ** : Run ` ./dev lint ` before committing
72
+ 1 . ** Environment Setup** : Run ` ./dev doctor ` to ensure all dependencies are installed.
73
+ 2 . ** Building** : Use ` ./dev build short ` for iterative development, ` ./dev build cockroach ` for full builds.
74
+ 3 . ** Testing** : Run package-specific tests with ` ./dev test pkg/[package] ` .
75
+ 4 . ** Code Generation** : After schema/proto changes, run ` ./dev generate go ` .
76
+ 5 . ** Linting ** : Run with ` ./dev lint ` or ` ./dev lint --short ` . This takes a while, so no need to run it regularly.
75
77
76
78
### Testing Strategy
77
79
78
80
CockroachDB has comprehensive testing infrastructure:
79
- - ** Unit Tests** : Standard Go tests throughout ` /pkg/ ` packages
80
- - ** Logic Tests** : SQL correctness tests using ` ./dev testlogic `
81
- - ** Roachtests** : Distributed system integration tests
82
- - ** Acceptance Tests** : End-to-end testing in ` /pkg/acceptance/ `
83
- - ** Stress Testing** : Continuous testing with ` --stress ` flag
81
+ - ** Unit Tests** : Standard Go tests throughout ` /pkg/ ` packages.
82
+ - ** Logic Tests** : SQL correctness tests using ` ./dev testlogic ` .
83
+ - ** Roachtests** : Distributed system integration tests.
84
+ - ** Acceptance Tests** : End-to-end testing in ` /pkg/acceptance/ ` .
85
+ - ** Stress Testing** : Continuous testing with ` --stress ` flag.
86
+
84
87
85
88
### Build System
86
89
@@ -93,6 +96,8 @@ CockroachDB has comprehensive testing infrastructure:
93
96
94
97
** Package Structure:**
95
98
- ` /pkg/sql/ ` - SQL layer (parser, optimizer, executor)
99
+ - ` /pkg/sql/opt ` - Query optimizer and planner
100
+ - ` /pkg/sql/schemachanger ` - Declarative schema changer
96
101
- ` /pkg/kv/ ` - Key-value layer and transaction management
97
102
- ` /pkg/storage/ ` - Storage engine interface
98
103
- ` /pkg/server/ ` - Node and cluster management
0 commit comments