THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
MessageAndOffset => Offset MessageSize Message Offset => int64 MessageSize => int32 Message => Crc MagicByte Attributes Timestamp KeyLength Key ValueLength Value Crc => int32 MagicByte => int8 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"
- If the magic byte on message is 0, the broker should use the null value for log compaction.
- If the magic byte on message is 1, the broker should use the null value for log compaction.
- If the magic byte on message is 2, the broker should use the tombstone bit for log compaction.
- 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.
...