[
https://issues.apache.org/jira/browse/KAFKA-21228?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Chia-Ping Tsai resolved KAFKA-21228.
------------------------------------
Fix Version/s: 4.5.0
Resolution: Fixed
> The cold snapshot timer should check pending updates instead of snapshot
> timestamps
> -----------------------------------------------------------------------------------
>
> Key: KAFKA-21228
> URL: https://issues.apache.org/jira/browse/KAFKA-21228
> Project: Kafka
> Issue Type: Improvement
> Reporter: Chia-Ping Tsai
> Assignee: Muralidhar Basani
> Priority: Minor
> Fix For: 4.5.0
>
>
> long coldSnapshottedPartitionsCount = shareStateMap.values().stream()
> .filter(shareGroupOffset -> shareGroupOffset.createTimestamp() -
> shareGroupOffset.writeTimestamp() != 0)
> .count();
> // If all share partitions are snapshotted, it means that
> // system is quiet and cold snapshotting will not help much.
> if (coldSnapshottedPartitionsCount == shareStateMap.size()) {
> log.debug("All share snapshot records already cold snapshotted,
> skipping.");
> return new CoordinatorResult<>(List.of(), null);
> }
>
> The early return treats "all partitions cold-snapshotted" as "system is
> quiet". But ShareUpdate does not touch createTimestamp or writeTimestamp (see
> merge()), so once every partition has been cold-snapshotted, the timer
> returns early on every run until some partition reaches the records
> threshold. Slow-traffic partitions are never flushed, which conflicts with
> the purpose of the timer.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)