Kafka not deleting key with tombstone

前端 未结 3 1608
一生所求
一生所求 2020-12-30 08:28

I create a kafka topic with below properties

min.cleanable.dirty.ratio=0.01,delete.retention.ms=100,segment.ms=100,cleanup.policy=compact

Le

3条回答
  •  隐瞒了意图╮
    2020-12-30 08:57

    The algorithm for removing the tombstone in a compacted is supposed to be the following.

    1. Tombstone is never removed when it's still in the dirty portion of the log.
    2. After the tombstone is in the cleaned portion of the log, we further delay the removal of the tombstone by delete.retention.ms since the time the tombstone is in the cleaned portion.

    It's possible that the tombstones are still in the dirty portion of the log and hence not cleared. Triggering a few more messages of different keys should push the tombstones into the cleaned portion of the log and delete them.

提交回复
热议问题