Document the purpose of clean shutdown file in the code.
Remove the previous TODO to remove the clean shutdown file with some of the discussion from
Author: Holden Karau
Reviewers: Ismael Juma
Closes from holdenk/KAFKA-4380-document-clean-shutdown-file
@@ -1635,9 +1635,12 @@ object Log {
/** A temporary file used when swapping files into the log */
val SwapFileSuffix = ".swap"
- /** Clean shutdown file that indicates the broker was cleanly shutdown in 0.8. This is required to maintain backwards compatibility
- * with 0.8 and avoid unnecessary log recovery when upgrading from 0.8 to 0.8.1 */
- /** TODO: Get rid of CleanShutdownFile in 0.8.2 */
+ /** Clean shutdown file that indicates the broker was cleanly shutdown in 0.8 and higher.
+ * This is used to avoid unnecessary recovery after a clean shutdown. In theory this could be
+ * avoided by passing in the recovery point, however finding the correct position to do this
+ * requires accessing the offset index which may not be safe in an unclean shutdown.
+ * For more information see the discussion in PR#2104
+ */
val CleanShutdownFile = ".kafka_cleanshutdown"
/** a directory that is scheduled to be deleted */
