rajinisivaram opened a new pull request #11221: URL: https://github.com/apache/kafka/pull/11221
`AbstractFetcherThread#truncateOnFetchResponse` is used with IBP 2.7 and above to truncate partitions based on diverging epoch returned in fetch responses. Truncation should only be performed for partitions that are still owned by the fetcher and this check should be done while holding `partitionMapLock` to ensure that any partitions removed from the fetcher thread are not truncated. The PR adds this check. Truncation will be performed by any new fetcher that owns the partition when it restarts fetching. ### Committer Checklist (excluded from commit message) - [ ] Verify design and implementation - [ ] Verify test coverage and CI build status - [ ] Verify documentation (including upgrade notes) -- 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