{"record":{"id":"492559906d0616a3","repo":"vitessio/vitess","slug":"unkown-decompressor-engine-q","errorCode":null,"errorMessage":"Unkown decompressor engine: %q","messagePattern":"Unkown decompressor engine: %q","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"go/vt/mysqlctl/compression.go","lineNumber":233,"sourceCode":"\t}\n\n\tswitch engine {\n\tcase PgzipCompressor:\n\t\td, err := pgzip.NewReader(reader)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdecompressor = d\n\tcase Lz4Compressor:\n\t\tdecompressor = io.NopCloser(lz4.NewReader(reader))\n\tcase ZstdCompressor:\n\t\td, err := zstd.NewReader(reader)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tdecompressor = d.IOReadCloser()\n\tdefault:\n\t\terr = fmt.Errorf(\"Unkown decompressor engine: %q\", engine)\n\t\treturn decompressor, err\n\t}\n\n\tlogger.Infof(\"Decompressing backup using engine %q\", engine)\n\treturn decompressor, err\n}\n\n// This returns a writer that will compress the data using the specified engine before writing to the underlying writer.\nfunc newBuiltinCompressor(engine string, writer io.Writer, logger logutil.Logger) (compressor io.WriteCloser, err error) {\n\tswitch engine {\n\tcase PgzipCompressor:\n\t\tgzip, err := pgzip.NewWriterLevel(writer, compressionLevel)\n\t\tif err != nil {\n\t\t\treturn compressor, vterrors.Wrap(err, \"cannot create gzip compressor\")\n\t\t}\n\t\tgzip.SetConcurrency(backupCompressBlockSize, backupCompressBlocks)\n\t\tcompressor = gzip\n\tcase PargzipCompressor:","sourceCodeStart":215,"sourceCodeEnd":251,"githubUrl":"https://github.com/vitessio/vitess/blob/01a25a7d176f94613b8d59d799f438380a8760e4/go/vt/mysqlctl/compression.go#L215-L251","documentation":"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.","triggerScenarios":"Extracting/restoring a backup whose manifest lists a compression engine unknown to the current binary's built-in decompressor switch (createDecompressor -> newBuiltinDecompressor).","commonSituations":"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.","solutions":["Check the engine name in the backup manifest and use a binary that supports it (upgrade vttablet/mysqlctl).","If the engine is external, ensure it is registered as an external decompressor instead of relying on the built-in path.","Recreate the backup with a supported engine such as gzip or zstd."],"exampleFix":"// before\nrestoring backup made with engine \"zstd-min\" on older binary\n// after\nupgrade to a release whose newBuiltinDecompressor handles \"zstd-min\", or re-backup with \"gzip\"","handlingStrategy":"fallback","validationCode":"// before restore: check manifest engine against binary support\nif manifest.CompressionEngineName != \"gzip\" && manifest.CompressionEngineName != \"pgzip\" && manifest.CompressionEngineName != \"zstd\" {\n\t// route to external decompressor or upgrade binary\n}","typeGuard":null,"tryCatchPattern":"d, err := createDecompressor(ctx, logger, engine, reader)\nif err != nil {\n\treturn fmt.Errorf(\"engine %q unsupported by this binary: %w\", engine, err)\n}","preventionTips":["Restore backups with same-or-newer Vitess version that wrote them","Record engine name and Vitess version in backup metadata/monitoring","Test restore path after every version upgrade"],"tags":["backup","decompression","version-compatibility"],"backgroundTag":"unsupported-compression-engine","analyzedSha":"01a25a7d176f94613b8d59d799f438380a8760e4","analyzedAt":"2026-09-01T17:28:30.605Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}