Details
Description
Consider following sequence when running Kafka in KRaft mode:
- A partition log "log1" is created under "logDir1", and some records are appended to it.
- Broker crashes. No clean shutdown file is created in "logDir1".
- Broker is restarted. BrokerServer.startup is called.
- On a different thread, LogManager.startup is called by BrokerMetadataPublisher.
- Before LogManager.startup finishing recovering logs under "logDir1", fatal exception is thrown in BrokerServer.startup.
- In exception hander, BrokerServer.startup calls LogManager.shutdown. As a result, a clean shutdown file is created under "logDir1"
- Broker is restarted again. Due to the clean shutdown file created in step 6, recovery is skipped for logs under "logDir1", which is not right because "logDir1" was not fully recovered in step 5.
Attachments
Issue Links
- links to