You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "dengziming (Jira)" <ji...@apache.org> on 2021/08/13 15:46:00 UTC

[jira] [Commented] (KAFKA-12908) Load snapshot heuristic

    [ https://issues.apache.org/jira/browse/KAFKA-12908?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17398747#comment-17398747 ] 

dengziming commented on KAFKA-12908:
------------------------------------

It seems we can't write the number of records in a snapshot to the SnapshotHeader, instead, we can write num of records to SnapshotFooter, so we should read SnapshotFooter to decide whether to load a snapshot or read from the next offset. WDYT [~jagsancio]

> Load snapshot heuristic
> -----------------------
>
>                 Key: KAFKA-12908
>                 URL: https://issues.apache.org/jira/browse/KAFKA-12908
>             Project: Kafka
>          Issue Type: Sub-task
>            Reporter: Jose Armando Garcia Sancio
>            Assignee: dengziming
>            Priority: Minor
>
> The {{KafkaRaftCient}} implementation only forces the {{RaftClient.Listener}} to load a snapshot only when the listener's next offset is less than the start offset.
> This is technically correct but in some cases it may be more efficient to load a snapshot even when the next offset exists in the log. This is clearly true when the latest snapshot has less entries than the number of records from the next offset to the latest snapshot.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)