mz-parallel-workload
Installation
SKILL.md
Extending Parallel Workload
The parallel-workload framework stress-tests Materialize by running random SQL actions concurrently across multiple threads. It catches panics and unexpected query errors - it does not verify result correctness.
When to Use This Framework
Add coverage here when a bug manifests as:
- A panic under concurrent operations
- An unexpected error from a query that should succeed (or fail gracefully)
- A crash or connection loss triggered by specific DDL/DML combinations
How It Works
- The orchestrator spawns N worker threads, each assigned an action list (read, fetch, write, dml_nontrans, or ddl) based on the configured
Complexity. - Each worker randomly selects actions from its list using weighted random choice and executes them in a loop until the runtime expires.
- If an action raises a
QueryError, the worker checksaction.errors_to_ignore(exe). If the error matches, it's logged and ignored. If not, the test fails. - All threads share a
Databaseobject that tracks created objects (tables, views, clusters, etc.) with thread-safe locking.
Adding a New Action
Related skills