{"record":{"id":"36f0ebf741a5b85f","repo":"risingwavelabs/risingwave","slug":"invalid-format-version-0","errorCode":null,"errorMessage":"Invalid format version: {0}","messagePattern":"Invalid format version: (.+?)","errorType":"error_code","errorClass":"HummockError","httpStatus":null,"severity":"critical","filePath":"src/storage/src/hummock/error.rs","lineNumber":27,"sourceCode":"// Unless required by applicable law or agreed to in writing, software\n// distributed under the License is distributed on an \"AS IS\" BASIS,\n// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n// See the License for the specific language governing permissions and\n// limitations under the License.\n\nuse risingwave_object_store::object::ObjectError;\nuse risingwave_pb::id::TableId;\nuse thiserror::Error;\nuse thiserror_ext::AsReport;\nuse tokio::sync::oneshot::error::RecvError;\n\n// TODO(error-handling): should prefer use error types than strings.\n#[derive(Error, thiserror_ext::ReportDebug, thiserror_ext::Arc)]\n#[thiserror_ext(newtype(name = HummockError, backtrace))]\npub enum HummockErrorInner {\n    #[error(\"Magic number mismatch: expected {expected}, found: {found}\")]\n    MagicMismatch { expected: u32, found: u32 },\n    #[error(\"Invalid format version: {0}\")]\n    InvalidFormatVersion(u32),\n    #[error(\"Checksum mismatch: expected {expected}, found: {found}\")]\n    ChecksumMismatch { expected: u64, found: u64 },\n    #[error(\"Invalid block\")]\n    InvalidBlock,\n    #[error(\"Encode error: {0}\")]\n    EncodeError(String),\n    #[error(\"Decode error: {0}\")]\n    DecodeError(String),\n    #[error(\"ObjectStore failed with IO error: {0}\")]\n    ObjectIoError(\n        #[from]\n        #[backtrace]\n        ObjectError,\n    ),\n    #[error(\"Meta error: {0}\")]\n    MetaError(String),\n    #[error(\"SharedBuffer error: {0}\")]","sourceCodeStart":9,"sourceCodeEnd":45,"githubUrl":"https://github.com/risingwavelabs/risingwave/blob/6469eb736d691e8e9b8a419a57edd6429ca77417/src/storage/src/hummock/error.rs#L9-L45","documentation":"Hummock (RisingWave's storage engine) read a data file (SST/table) whose format version field does not match any version this build understands. The library throws this to prevent reading a file written by an incompatible writer, which would otherwise cause silent corruption. The u32 payload is the version found in the file header.","triggerScenarios":"Reading an SST/block whose serialized header contains an unrecognized format version, typically via Hummock's block/table read path after the version check.","commonSituations":"Downgrading RisingWave to an older release after newer code wrote data files; mixing binary versions against the same object store; reading data written by a fork or patched build.","solutions":["Upgrade RisingWave to the version that wrote the data files (the format version was introduced by a newer release).","Check the object store bucket for data written by another cluster/build and point this cluster at the correct bucket.","If downgrade was intentional, migrate data through a supported path (e.g. export/import) instead of reusing the same store.","Verify no manual tooling or fork wrote the file and inspect the file header to confirm its version."],"exampleFix":"// before: downgraded binary reading SSTs written by newer version\nrw config: s3.bucket = rw-prod (shared with v2.0 cluster)\n// after\nrw config: s3.bucket = rw-prod-v2 (dedicated bucket, or upgrade binary to v2.0)","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"// Rust\nfn is_invalid_format_version(e: &HummockError) -> bool {\n    e.as_any().downcast_ref::<HummockError>()\n        .map(|h| h.to_string().starts_with(\"Invalid format version\"))\n        .unwrap_or(false)\n}","tryCatchPattern":"// Rust\nmatch hummock_read(...) {\n    Err(e) if e.to_string().starts_with(\"Invalid format version\") => {\n        // halt service; requires binary upgrade — do not retry\n    }\n    r => r?,\n}","preventionTips":["Never downgrade RisingWave binaries below the version that wrote the object store data.","Use a dedicated object store bucket per cluster/version migration.","Test binary upgrades/downgrades on a staging copy of production data."],"tags":["storage","hummock","version-compatibility","serialization"],"backgroundTag":"schema-validation-failed","analyzedSha":"6469eb736d691e8e9b8a419a57edd6429ca77417","analyzedAt":"2026-09-11T21:06:21.487Z","contentChangedAt":"2026-09-11T21:06:21.487Z","schemaVersion":2},"datasetVersion":"2026-09-14T16:17:12.679Z"}