clolov commented on PR #14652: URL: https://github.com/apache/kafka/pull/14652#issuecomment-1786900594
Heya @hudeqi, thank you for the contribution! I have been reviewing this code change and I am a bit uncertain to its purpose so I wanted to ask some follow up questions. As far as I understand the current code flow roughly does the following: 1. Download a snapshot file from remote storage 2. Reset data structures within ProducerStateManager and delete snapshots present in the *snapshots* data structure via the `truncateFullyAndStartAt` 3. Read all snapshot files on disk and repopulate the data structures inside the ProducerStateManager However, since downloading the snapshot from remote storage does not update the *snapshots* data structure I do not see how the new file will be deleted as part of the call to `truncateFullyAndStartAt`. I also found the JIRA description a bit confusing because it kept on linking to comments people made, but none of them detailed how this could be happening. Could you elaborate how the call to `truncateFullyAndStartAt` will delete the newly downloaded file? Alternatively have I misunderstood what you mean to do with this pull request? -- 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