Versions Compared

Key

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

...

 

MessageAndOffset => Offset MessageSize Message
  Offset => int64  
  MessageSize => int32
   
  Message => Crc MagicByte Attributes Timestamp KeyLength Key ValueLength Value
    Crc => int32
    MagicByte => int8  <---------------------- Bump the Magic Byte to 2
    Attributes => int8 <---------------------- Use Bit 5 as boolean flag for 'isTombstone' flag
    Timestamp => int64
    KeyLength => int32
    Key => bytes
    ValueLength => int32
    Value => bytes

 

LogCleaner

Update method "shouldRetainMessage" to also look at attribute

  • when message magic byte is 1 it will look for null value to determine if a message should be treated as a tombstone.
  • when magic byte has changed to 2 it will use  attribute bit 5 for tombstone marker, as we expect this to be set (either by producer or by upgrade)

This will be done at the per message level.

 

 

Compatibility, Deprecation, and Migration Plan

...