Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Current stateUnder Discussion

Discussion thread: The email not show in archive yet, seemly need wait a while. Here

JIRA: KAFKA-1646

Motivation

...

  1. Configuration - add one configuration item "log.preallocate",  parse it in KafkaConfig.scala, and transfer to KafkaServer.scala, LogConfig.scala.
  2. In Log.scala 
    1.  add one function initFileSize().  if the log preallocation is enabled, the value is config.segmentSize - 2 * config.maxMessageSize,  else the value is 0.
    2.  pass the initFileSize and config.preallocate to LogSegment when need create one LogSegment.
    3.  When need roll to a new file, trim log file of active segment
  3. In LogSegment.scala - pass the initFileSize and preallocation to FileMessageSet.
  4. In FileMessageSet.scala 
    1.  add one function trim().  Call it when close or roll a new LogSegment.
    2. Move openChannel from CoreUtil.scala and add two more parameter "initFileSize" and "preallocate".
    3. Add one constructor function with two more parameters  "initFileSize" and "preallocate".
  5. In CoreUtils.scala
    1. Move openChallel to FileMessageSet.scala

Compatibility, Deprecation, and Migration Plan

...