{"record":{"id":"399975083bc6bf7b","repo":"quickwit-oss/quickwit","slug":"failed-to-create-offsetdatetime-from-split-updat","errorCode":null,"errorMessage":"Failed to create `OffsetDateTime` from split update timestamp.","messagePattern":"Failed to create `OffsetDateTime` from split update timestamp\\.","errorType":"panic","errorClass":null,"httpStatus":null,"severity":"error","filePath":"quickwit/quickwit-cli/src/split.rs","lineNumber":405,"sourceCode":"    //     println!(\"{hotcache_table}\");\n    // }\n    Ok(())\n}\n\nfn make_split_table(splits: &[Split], title: &str) -> Table {\n    let rows = splits\n        .iter()\n        .map(|split| {\n            let time_range = if let Some(time_range) = &split.split_metadata.time_range {\n                format!(\"[{time_range:?}]\")\n            } else {\n                \"[*]\".to_string()\n            };\n            let created_at =\n                OffsetDateTime::from_unix_timestamp(split.split_metadata.create_timestamp)\n                    .expect(\"Failed to create `OffsetDateTime` from split create timestamp.\");\n            let updated_at = OffsetDateTime::from_unix_timestamp(split.update_timestamp)\n                .expect(\"Failed to create `OffsetDateTime` from split update timestamp.\");\n\n            SplitRow {\n                split_id: split.split_metadata.split_id.clone(),\n                split_state: split.split_state,\n                num_docs: split.split_metadata.num_docs,\n                size_mega_bytes: split.split_metadata.uncompressed_docs_size_in_bytes / 1_000_000,\n                created_at,\n                updated_at,\n                time_range,\n            }\n        })\n        .sorted_by(|left, right| left.created_at.cmp(&right.created_at));\n    make_table(title, rows, false)\n}\n\nfn parse_date(date_arg: &str, option_name: &str) -> anyhow::Result<OffsetDateTime> {\n    let description = format_description::parse_borrowed::<2>(\"[year]-[month]-[day]\")?;\n    if let Ok(date) = Date::parse(date_arg, &description) {","sourceCodeStart":387,"sourceCodeEnd":423,"githubUrl":"https://github.com/quickwit-oss/quickwit/blob/a39730c5cdcd1a4fe798403737ae293999ea21f8/quickwit/quickwit-cli/src/split.rs#L387-L423","documentation":"Same conversion as the create-timestamp case but for split.update_timestamp, the last-update time recorded by the metastore. OffsetDateTime::from_unix_timestamp returns Err when the seconds value is out of the supported range; the expect turns that into a panic while building the `quickwit split list` table.","triggerScenarios":"Listing splits where any split's update_timestamp is outside the valid Unix timestamp range (corrupt or fabricated metastore data).","commonSituations":"Corrupted PostgreSQL/file-backed metastore rows; splits copied between environments with mangled timestamps; tests or tooling that inserted placeholder sentinel values.","solutions":["Fix the update_timestamp for the offending split row in the metastore.","Remove and re-ingest the corrupt split.","Use unwrap_or_default-style fallback so one bad row does not kill the listing."],"exampleFix":"// before\nOffsetDateTime::from_unix_timestamp(split.update_timestamp)\n    .expect(\"Failed to create `OffsetDateTime` from split update timestamp.\")\n// after\nOffsetDateTime::from_unix_timestamp(split.update_timestamp)\n    .unwrap_or(OffsetDateTime::UNIX_EPOCH)","handlingStrategy":"fallback","validationCode":"let ts = split.update_timestamp;\nif !(0..=253_402_300_799).contains(&ts) { eprintln!(\"invalid update_timestamp {ts}\"); }","typeGuard":"fn is_sane_unix_ts(ts: i64) -> bool { (0..=253_402_300_799).contains(&ts) }","tryCatchPattern":"OffsetDateTime::from_unix_timestamp(split.update_timestamp)\n    .unwrap_or(OffsetDateTime::UNIX_EPOCH)","preventionTips":["Treat out-of-range timestamps as metadata corruption and quarantine the split.","Validate split metadata at ingestion boundaries.","Prefer graceful fallback rendering in CLI table builders."],"tags":["cli","timestamps","metastore","panic"],"backgroundTag":"invalid-date-format","analyzedSha":"a39730c5cdcd1a4fe798403737ae293999ea21f8","analyzedAt":"2026-09-08T13:19:37.784Z","contentChangedAt":"2026-09-08T13:19:37.784Z","schemaVersion":2},"datasetVersion":"2026-09-14T11:17:12.474Z"}