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

[jira] [Commented] (KAFKA-10819) The freeze operation should validate the content of the snapshot

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

HaiyuanZhao commented on KAFKA-10819:
-------------------------------------

Hi, [~jagsancio]  I'm working on this and have one question.

The second validation needs the CRC for each record batch is correct. It is ok if the snapshot is composed of MemoryRecords. 
However, It seems no direct way to check CRC if the snapshot is composed of UnalignedRecords because UnalignedRecords do not include record batch information.
Can you give me some advice for this? I'm not sure if I need to re-compute crc for UnalignedRecords or return MemoryRecords in FetchSnapshotResponse to reuse the existing crc logic.

> The freeze operation should validate the content of the snapshot
> ----------------------------------------------------------------
>
>                 Key: KAFKA-10819
>                 URL: https://issues.apache.org/jira/browse/KAFKA-10819
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: replication
>            Reporter: Jose Armando Garcia Sancio
>            Assignee: HaiyuanZhao
>            Priority: Major
>
> When freeze is called the Raft Client should make sure:
>  # That the file contains complete record batches
>  # That the CRC for each record batch is correct
> If any of the validations fail then the freeze operation should fail. The state of the snapshot should be as if close was called without calling freeze. In other words no immutable snapshot gets created.



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