dengziming edited a comment on pull request #11934: URL: https://github.com/apache/kafka/pull/11934#issuecomment-1075948925
I don't think this is a trivial change, I'll give my take on what I think we should do here, but let's try to agree before we go any further. 1. add a `size` method to all MetadataImage(TopicsImage, FeatureImage etc.) and MetadataControllerManager(FeatureControlManager, ReplicationControlManager etc.) to compute how many records we will be written to a snapshot. 2. Add recordSize field to SnapshotHeader, the value is computed from step 1. 3. When checking listener status, compare the record size of log (committedOffset - listenerContext.nextExpectedOffset()) and the size of snapshot(recordSize) to decide whether RaftClient should load a snapshot or continue read metadata log. cc @jsancio , do you have some comments for this? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: jira-unsubscr...@kafka.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org