From c43bc54b3195fdac575255e59f0e6e62dcb89dba Mon Sep 17 00:00:00 2001 From: Holden Karau Date: Fri, 25 Aug 2017 11:03:08 -0700 Subject: [PATCH] Replace the todo clearer description of why cleaning it up probably isn't a great idea --- core/src/main/scala/kafka/log/Log.scala | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/core/src/main/scala/kafka/log/Log.scala b/core/src/main/scala/kafka/log/Log.scala index 60ec7a09ba61c..d3de24db643c4 100644 --- a/core/src/main/scala/kafka/log/Log.scala +++ b/core/src/main/scala/kafka/log/Log.scala @@ -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 */