showuon commented on PR #14136: URL: https://github.com/apache/kafka/pull/14136#issuecomment-1691622348
> I want to ensure that there are no race conditions between LISR and updateMetadata requests from controller i.e. validate that metadata cache is updated during LISR request. Give me a day to validate that. This is a really great point. I've taken a look: - For KRaft, the metadata cache is synced up when `RLM#onLeadershipChange`. - For ZK, the controller will send out LISR and updateMetadataRequest basically at the same time (but LISR is enqueued first). I think in ZK, there might be chances the topicID is still not updated in metadataCache before `RLM#onLeadershipChange` is invoked. I think we need to have some solution for it, or we revert this change before ZK got removed in v4.0? Thoughts? -- 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