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

  1. The orchestrator spawns N worker threads, each assigned an action list (read, fetch, write, dml_nontrans, or ddl) based on the configured Complexity.
  2. Each worker randomly selects actions from its list using weighted random choice and executes them in a loop until the runtime expires.
  3. If an action raises a QueryError, the worker checks action.errors_to_ignore(exe). If the error matches, it's logged and ignored. If not, the test fails.
  4. All threads share a Database object that tracks created objects (tables, views, clusters, etc.) with thread-safe locking.

Adding a New Action

Related skills
Installs
2
GitHub Stars
6.3K
First Seen
14 days ago