Skip to content

SYSTEM Cited by 1 source

spirit

Definition

spirit is a newer (post-2020) online schema change tool for MySQL developed and open-sourced by CashApp, hosted at github.com/cashapp/spirit. It implements the shadow-table online schema change pattern — the same four-phase shape as pt-online-schema-change, gh-ost, and Vitess VReplication — and adds automatic detection of ALGORITHM=INSTANT eligibility so the tool can short-circuit the shadow-table path when the change qualifies.

Shlomi Noach names spirit as "recent newcomer" in his 2024-07-23 survey of MySQL online schema change tools, positioning it alongside the older pt-osc and gh-ost as a third-party shadow-table option with an extra INSTANT-detection layer.

Why it shows up on this wiki

spirit's distinguishing feature — auto-detecting INSTANT-DDL eligibility at migration-submission time — makes it one of two tools (the other being Vitess) that reconcile the fast-path / safe-path trade-off inside a single submission surface. Canonicalised as patterns/auto-detect-instant-ddl-eligibility.

Verbatim framing from Noach (2024):

"Both vitess and spirit go an extra mile and can auto detect when a migration can be fulfilled using INSTANT DDL, which means you don't need to think about it or be aware of which particular version supports which changes." (Source: sources/2026-04-21-planetscale-the-state-of-online-schema-migrations-in-mysql)

This page is a minimal-viable anchor for cross-references from the online-schema-change taxonomy. Deep mechanism disclosure awaits a CashApp engineering post; this page captures what's disclosed in the 2024 PlanetScale taxonomy post.

Class membership

Shares the six-property operational profile of the shadow-table tool class, per Noach (2024):

  1. Mimics ALTER TABLE via shadow table + slow copy.
  2. Longer wall-clock than native ALTER TABLE.
  3. Requires extra disk space (~= original table size).
  4. Causes binlog bloat (whole table through the binlogs).
  5. Respects production workload (throttles on lag / load).
  6. Batched and interruptible (abort leaves cleanup artefact, no immediate cost).

See patterns/shadow-table-online-schema-change for the mechanism-class canonicalisation.

Auto-detect INSTANT eligibility

The post's load-bearing architectural framing for spirit (and Vitess) is that the operator shouldn't need to know which MySQL version supports which INSTANT change shapes. Instead, the tool inspects the submitted DDL and:

  • Invokes ALGORITHM=INSTANT directly when every statement qualifies — seconds to complete.
  • Falls back to the shadow-table path otherwise — hours on a large table.

This is the spirit/Vitess analogue of PlanetScale's product-layer instant-deploy eligibility rule — one submission surface, engine-internal fast-path decision, revert trade-off exposed to the operator.

Seen in

Last updated · 470 distilled / 1,213 read