Index: core/src/main/scala/kafka/log/LogSegment.scala
===================================================================
--- core/src/main/scala/kafka/log/LogSegment.scala	(revision 1405091)
+++ core/src/main/scala/kafka/log/LogSegment.scala	(working copy)
@@ -20,7 +20,11 @@
                  val indexIntervalBytes: Int,
                  time: Time) extends Range with Logging {
   
-  var firstAppendTime: Option[Long] = None
+  var firstAppendTime: Option[Long] =
+    if (messageSet.sizeInBytes > 0)
+      Some(time.milliseconds)
+    else
+      None
   
   /* the number of bytes since we last added an entry in the offset index */
   var bytesSinceLastIndexEntry = 0
@@ -118,6 +122,8 @@
       return
     index.truncateTo(offset)  
     messageSet.truncateTo(mapping.position)
+    if (messageSet.sizeInBytes == 0)
+      firstAppendTime = None
   }
   
   /**
