mz-limits-test

Creates and debugs Materialize limits tests that stress the system with many objects.

6.4k|512|Updated Feb 22, 2019
One-click install
npx skills add https://github.com/MaterializeInc/materialize --skill mz-limits-test
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: mz-limits-test
Source: https://github.com/MaterializeInc/materialize/tree/main/.agents/skills/mz-limits-test
Command: npx skills add https://github.com/MaterializeInc/materialize --skill mz-limits-test

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Materialize engineers need to verify the system survives extreme scale—thousands of tables, views, sources, and indexes—without regressions like fixpoint panics, stack overflows, CI timeouts, or OOM crashes. Writing these stress tests by hand is error-prone and requires knowing the Generator framework conventions.

Core Features & Use Cases

  • Generator Subclass Authoring: Guides creation of new Generator subclasses in test/limits/mzcompose.py with auto-discovery via all_subclasses(Generator), requiring no manual registration.
  • Testdrive Command Generation: Implements body() classmethods that print testdrive commands, using helpers like all(), no_first(), no_last(), and store_explain_and_run() for EXPLAIN timing.
  • Limit Tuning: Advises on overriding COUNT and MAX_COUNT, bumping system limits like max_tables via ALTER SYSTEM SET, and running with --find-limit for Release Qualification.
  • Use Case: Add a new scaling test for a feature, then run it locally with bin/mzcompose --find limits run main --scenario=MyNewFeature to verify it passes under a 2GB memory limit.

Quick Start

Ask the assistant to add a new limits test Generator subclass in test/limits/mzcompose.py that creates 1000 tables and verifies queries against them.

Frequently Asked Questions about mz-limits-test

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I add a new limits test in Materialize?

Add a class extending Generator in test/limits/mzcompose.py and implement the body() classmethod to print testdrive commands. Subclasses are auto-discovered via all_subclasses(Generator), so no registration is needed.

How do I run a Materialize limits test locally?

Run bin/mzcompose --find limits down followed by bin/mzcompose --find limits run main --scenario=YourScenarioName. Add --find-limit for Release Qualification mode to probe upper object count limits.

What does the Generator base class provide in limits tests?

Generator provides COUNT (default 1000), VERSION, MAX_COUNT, iterator helpers all(), no_first(), no_last(), and store_explain_and_run() for recording EXPLAIN timing. The generate() method calls header(), body(), then footer().

Why does my limits test fail with too many objects?

Materialize enforces system limits like max_tables and max_objects_per_schema. Bump them in body() using ALTER SYSTEM SET via the built-in mz_system testdrive connection, or lower COUNT if the operation is slow in CI.

What failures do Materialize limits tests catch?

Limits tests catch fixpoint panics, stack overflows, CI timeouts from O(N^M) complexity with N around 1000, and OOM panics under the 2GB memory limit. They stress Materialize with many objects, complex queries, and large ingestions.