Description
When initializing a log, we may use the checkpointed log start offset. We need to ensure that the log end offset is set consistently with this value (i.e. it must be greater than or equal to it). This may not always be true if the log data is removed or has become corrupted. As a simple experiment, you can try the following steps to reproduce the problem:
- Write some data to the partition
- Use DeleteRecords to advance log start
- Shutdown the broker
- Delete the log directory
- Restart the broker
You will see something like this in the logs:
[2019-04-29 11:55:21,259] INFO [Log partition=foo-0, dir=/tmp/kafka-logs] Completed load of log with 1 segments, log start offset 10 and log end offset 0 in 36 ms (kafka.log.Log)
This may be the cause of KAFKA-8255, but I am not sure yet.
Attachments
Issue Links
- links to