What is happening
An index can often be regenerated from a valid segment, but missing segment bytes cannot. Compacted topics, transactions, replication divergence, and leader epochs affect which record sequence is authoritative.
Kafka log recovery
Kafka stores partition data in segment files with offset and time indexes and transaction metadata. Startup recovery can validate the newest segment and truncate at the last valid record, which may remove evidence needed for deeper recovery.
Understand the symptom
An index can often be regenerated from a valid segment, but missing segment bytes cannot. Compacted topics, transactions, replication divergence, and leader epochs affect which record sequence is authoritative.
What you may see
A batch length, checksum, or record structure is invalid.
Offset or time index no longer matches the segment.
Follower and leader logs diverged at an epoch or offset.
A partition segment or checkpoint prevents startup.
Protect the source
Clone before restarting brokers.
Freeze time- and size-based cleanup.
Preserve the original distributed state first.
Do this now
Stop producers, retention, compaction, and moves.
Keep segment, index, checkpoint, and metadata files.
Save leaders, ISR, epochs, topic IDs, offsets, and configurations.
Preserve sector errors before repeated broker scans.
NEPFOSYS process
NEPFOSYS correlates replicas, epochs, segments, batches, offsets, and checkpoints.
Valid record batches and recoverable index relationships are mapped from copies.
Keys, timestamps, transactions, ordering, and consumer priorities are checked.
A clear next step
Start a case with the exact symptoms, incident timeline, prior attempts, encryption details, and the files that matter most. NEPFOSYS will route the case to the appropriate DFW intake or nationwide mail-in path.
Start with a case reviewQuestions, answered
Often, if the underlying log segment is complete and valid.
Yes, when it contains the authoritative complete offset range.
Recovery may repeatedly truncate or alter the affected partition state.
DFW local · Nationwide mail-in