{"record":{"id":"9826353dd5a6ef88","repo":"influxdata/influxdb","slug":"table-snapshot-persistence-task-panicked-0","errorCode":null,"errorMessage":"table snapshot persistence task panicked: {0}","messagePattern":"table snapshot persistence task panicked: (.+?)","errorType":"error_code","errorClass":"PersisterError","httpStatus":null,"severity":"critical","filePath":"influxdb3_write/src/persister.rs","lineNumber":71,"sourceCode":"    #[error(\"serde_json error: {0}\")]\n    SerdeJson(#[from] serde_json::Error),\n\n    #[error(\"object_store error: {0}\")]\n    ObjectStore(#[from] object_store::Error),\n\n    #[error(\"parquet error: {0}\")]\n    ParquetError(#[from] parquet::errors::ParquetError),\n\n    #[error(\"tried to serialize a parquet file with no rows\")]\n    NoRows,\n\n    #[error(\"parse int error: {0}\")]\n    ParseInt(#[from] std::num::ParseIntError),\n\n    #[error(\"unexpected persister error: {0:?}\")]\n    Unexpected(#[from] anyhow::Error),\n\n    #[error(\"table snapshot persistence task panicked: {0}\")]\n    TableSnapshotPersistenceTaskFailed(#[source] tokio::task::JoinError),\n\n    #[error(\"snapshot manifest parse task panicked: {0}\")]\n    SnapshotParseTaskFailed(#[source] tokio::task::JoinError),\n\n    #[error(\"table index error: {0}\")]\n    TableIndexPathError(#[source] crate::paths::PathError),\n\n    #[error(\"object meta is missing filename\")]\n    MissingFilename,\n\n    #[error(\"failed to parse snapshot sequence number from filename\")]\n    InvalidSnapshotSequenceNumber,\n}\n\nimpl From<PersisterError> for DataFusionError {\n    fn from(error: PersisterError) -> Self {\n        match error {","sourceCodeStart":53,"sourceCodeEnd":89,"githubUrl":"https://github.com/influxdata/influxdb/blob/06200ef96ba82c5f6727e5038a83af8e722c6875/influxdb3_write/src/persister.rs#L53-L89","documentation":"PersisterError::TableSnapshotPersistenceTaskFailed indicates that a spawned tokio task responsible for persisting a table snapshot panicked. The JoinError from `tokio::spawn(...).await` is attached as the `#[source]`.","triggerScenarios":"Calling a Persister method that spawns a background table-snapshot persistence task (tokio::spawn) and the task panics (e.g. unwrap on None, index out of bounds, assertion inside the task); the JoinError surfaces when awaiting the handle.","commonSituations":"Panic inside snapshot code due to malformed data or a bug; OOM-triggered aborts in the task; running with a runtime shutdown while tasks are still pending.","solutions":["Read the attached JoinError's panic message to locate the panicking code in snapshot persistence.","Fix the underlying panic (usually an unwrap/expect on data that can legitimately be absent).","Check memory limits — panics/OOM kills in spawned tasks show up as JoinError.","Upgrade influxdb3 if the panic traces to library code."],"exampleFix":"// before: panicking unwrap inside snapshot task\nlet schema = tables.get(&table_id).unwrap();\n// after\nlet schema = tables.get(&table_id)\n    .ok_or_else(|| anyhow!(\"table {table_id} missing from snapshot\"))?;","handlingStrategy":"try-catch","validationCode":null,"typeGuard":"fn is_snapshot_task_panic(e: &PersisterError) -> bool {\n    matches!(e, PersisterError::TableSnapshotPersistenceTaskFailed(_))\n}","tryCatchPattern":"match persister.persist_snapshot(...).await {\n    Err(PersisterError::TableSnapshotPersistenceTaskFailed(join)) => {\n        eprintln!(\"snapshot task panicked: {join}\");\n        // inspect join.into_panic() downcast to &str/String for the panic message\n    }\n    Err(e) => return Err(e.into()),\n    Ok(v) => v,\n}","preventionTips":["Avoid unwrap/expect inside spawned snapshot tasks; return Results instead.","Run panics-in-tasks through `tokio::spawn` with JoinError handling and alerts.","Set catch_unwind-style monitoring/panic hooks to capture task panics in logs.","Watch memory limits; OOM can kill spawned tasks."],"tags":["tokio","panic","task","snapshot","rust"],"backgroundTag":"thread-interrupted","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"}