vitessio/vitess · error

Unkown decompressor engine: %q

Error message

Unkown decompressor engine: %q

What it means

Returned by newBuiltinDecompressor when the requested decompression engine name is not one of the built-in decompressors handled in the switch. Note the message has a typo ('Unkown') and does not wrap errUnsupportedCompressionEngine, so string matching on the message is required rather than errors.Is.

Source

Thrown at go/vt/mysqlctl/compression.go:233

	}

	switch engine {
	case PgzipCompressor:
		d, err := pgzip.NewReader(reader)
		if err != nil {
			return nil, err
		}
		decompressor = d
	case Lz4Compressor:
		decompressor = io.NopCloser(lz4.NewReader(reader))
	case ZstdCompressor:
		d, err := zstd.NewReader(reader)
		if err != nil {
			return nil, err
		}
		decompressor = d.IOReadCloser()
	default:
		err = fmt.Errorf("Unkown decompressor engine: %q", engine)
		return decompressor, err
	}

	logger.Infof("Decompressing backup using engine %q", engine)
	return decompressor, err
}

// This returns a writer that will compress the data using the specified engine before writing to the underlying writer.
func newBuiltinCompressor(engine string, writer io.Writer, logger logutil.Logger) (compressor io.WriteCloser, err error) {
	switch engine {
	case PgzipCompressor:
		gzip, err := pgzip.NewWriterLevel(writer, compressionLevel)
		if err != nil {
			return compressor, vterrors.Wrap(err, "cannot create gzip compressor")
		}
		gzip.SetConcurrency(backupCompressBlockSize, backupCompressBlocks)
		compressor = gzip
	case PargzipCompressor:

View on GitHub (pinned to 01a25a7d17)

Solutions

  1. Check the engine name in the backup manifest and use a binary that supports it (upgrade vttablet/mysqlctl).
  2. If the engine is external, ensure it is registered as an external decompressor instead of relying on the built-in path.
  3. Recreate the backup with a supported engine such as gzip or zstd.

Example fix

// before
restoring backup made with engine "zstd-min" on older binary
// after
upgrade to a release whose newBuiltinDecompressor handles "zstd-min", or re-backup with "gzip"
Defensive patterns

Strategy: fallback

Validate before calling

// before restore: check manifest engine against binary support
if manifest.CompressionEngineName != "gzip" && manifest.CompressionEngineName != "pgzip" && manifest.CompressionEngineName != "zstd" {
	// route to external decompressor or upgrade binary
}

Try / catch

d, err := createDecompressor(ctx, logger, engine, reader)
if err != nil {
	return fmt.Errorf("engine %q unsupported by this binary: %w", engine, err)
}

Prevention

When it happens

Trigger: Extracting/restoring a backup whose manifest lists a compression engine unknown to the current binary's built-in decompressor switch (createDecompressor -> newBuiltinDecompressor).

Common situations: Backup produced by a newer Vitess version with a newly added engine, restored by an older binary; corrupted or hand-edited backup manifest engine field; typo in engine name.

Related errors


AI-assisted analysis of vitessio/vitess@01a25a7d17 (2026-09-01). Data as JSON: /api/errors/492559906d0616a3. Report an issue: GitHub.