Re: doc clarification about meesage format

2024-10-24 Thread Xiang Zhang
Thanks Greg! It helps so much. This KIP seems familiar somehow, I should go through it again. Really appreciated! Replied Message From Greg Harris Date 10/25/2024 00:40 To dev@kafka.apache.org Cc us...@kafka.apache.org Subject Re: doc clarification about meesage format Hey Xiang

Re: doc clarification about meesage format

2024-10-24 Thread Greg Harris
Hey Xiang, Thanks for your questions! This is getting to the limit of my knowledge, but I'll answer as best I can. The partitionLeaderEpoch is only set once during the batch lifetime (during Produce), and is not mutated any other time. This includes when data is fetched by other replicas and by c

Re: doc clarification about meesage format

2024-10-23 Thread Xiang Zhang
Thank you Greg for all the knowledge, some follow up questions. Does partitionLeaderEpoch always reflect the latest leader election or an old epoch can be allowed ? If it is the first case, then I agree partitionLeaderEpoch should not be included in CRC computation. But it raises some new question

Re: doc clarification about meesage format

2024-10-23 Thread Greg Harris
Hi Xiang, Thanks for your question! That sentence is a justification for why the partitionLeaderEpoch field is not included in the CRC. If you mutate fields which are included in a CRC, you need to recompute the CRC value. See [1] for mutating the maxTimestamp. Compare that with [2] for setting t

doc clarification about meesage format

2024-10-22 Thread Xiang Zhang
Hi all, I am reading official doc here: https://kafka.apache.org/documentation/#messageformat, and I could not fully understand it. If someone can clarify it for me, it would be much appreciated. The sentence is The partition leader epoch field is not included in the CRC computation to avoid the