{"record":{"id":"6e341777a2c805cf","repo":"influxdata/influxdb","slug":"corrupt-load-state-0","errorCode":null,"errorMessage":"corrupt load state: {0}","messagePattern":"corrupt load state: (.+?)","errorType":"exception","errorClass":"Error","httpStatus":null,"severity":"critical","filePath":"influxdb3_write/src/write_buffer/mod.rs","lineNumber":89,"sourceCode":"    ParseError(WriteLineError),\n\n    #[error(\"incoming write was empty\")]\n    EmptyWrite,\n\n    #[error(\"column type mismatch for column {name}: existing: {existing:?}, new: {new:?}\")]\n    ColumnTypeMismatch {\n        name: String,\n        existing: ColumnType,\n        new: ColumnType,\n    },\n\n    #[error(\"catalog update error: {0}\")]\n    CatalogUpdateError(#[from] CatalogError),\n\n    #[error(\"error from persister: {0}\")]\n    PersisterError(#[from] PersisterError),\n\n    #[error(\"corrupt load state: {0}\")]\n    CorruptLoadState(String),\n\n    #[error(\"database name error: {0}\")]\n    DatabaseNameError(#[from] DatabaseNameError),\n\n    #[error(\"error from table buffer: {0}\")]\n    TableBufferError(#[from] table_buffer::Error),\n\n    #[error(\"error in last cache: {0}\")]\n    LastCacheError(#[from] last_cache::Error),\n\n    #[error(\"database not found {db_name:?}\")]\n    DatabaseNotFound { db_name: String },\n\n    #[error(\"table not found {table_name:?} in db {db_name:?}\")]\n    TableNotFound { db_name: String, table_name: String },\n\n    #[error(\"tried accessing database that does not exist\")]","sourceCodeStart":71,"sourceCodeEnd":107,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/write_buffer/mod.rs#L71-L107","documentation":"This error signals that state loaded from persisted storage is corrupt or in an unexpected shape when the write buffer initializes. The String payload describes what was corrupt. It is thrown to avoid silently operating on malformed persisted data, which could lead to data loss or panics later.","triggerScenarios":"Start-up or load path of the write buffer: deserializing persisted buffer/catalog state from object storage, reading snapshot or WAL-replay data that does not match the expected in-memory structures.","commonSituations":"Manual edits or partial writes to persisted files; influxdb3 version downgrade reading state written by a newer version; interrupted writes to object storage leaving truncated data; storage corruption.","solutions":["Read the payload String to identify which load state is corrupt","Restore the affected persisted data from backup/snapshot","Do not downgrade influxdb3 below the version that wrote the persisted state","If data is disposable, clear the affected persisted state and reinitialize"],"exampleFix":"// before: blindly restarting corrupt instance in a loop\nloop { if let Err(e) = load_buffer() { warn!(\"{e}\"); continue; } }\n// after: fail fast and require operator intervention\nif let Err(WriteBufferError::CorruptLoadState(msg)) = load_buffer() {\n    eprintln!(\"FATAL corrupt persisted state: {msg} - restore from backup\");\n    std::process::exit(1);\n}","handlingStrategy":"try-catch","validationCode":"// at startup, fail fast before serving traffic\nif let Err(WriteBufferError::CorruptLoadState(msg)) = buffer.load().await {\n    eprintln!(\"FATAL: corrupt persisted state: {msg}\");\n    std::process::exit(1);\n}","typeGuard":null,"tryCatchPattern":"match load_result {\n    Err(WriteBufferError::CorruptLoadState(msg)) => {\n        alert_operator(&msg); // require restore-from-backup, never auto-restart loop\n    }\n    other => other?,\n}","preventionTips":["Never manually edit or partially copy persisted state files","Avoid running a downgraded influxdb3 version against newer persisted data","Take regular backups/snapshots of persisted state","Ensure clean shutdowns; watch for interrupted writes to object storage"],"tags":["corruption","persistence","deserialization","influxdb"],"backgroundTag":"internal-invariant-violation","analyzedSha":"06200ef96ba82c5f6727e5038a83af8e722c6875","analyzedAt":"2026-09-19T12:55:30.003Z","contentChangedAt":"2026-09-19T12:55:30.003Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}