[ https://issues.apache.org/jira/browse/KAFKA-18555?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17914458#comment-17914458 ]
Ismael Juma edited comment on KAFKA-18555 at 1/19/25 3:17 PM: -------------------------------------------------------------- Note that the Kraft implementation adds a bunch of methods that are not usually needed (like mutability, etc). So, it makes sense to keep and use the interface and not to combine them. But there may be cases where the methods only exist in the implementation (and not interface) due to the previous zk implementation. In such cases, we should pull up the relevant methods so that no casting is required. was (Author: ijuma): Note that the Kraft implementation adds a bunch of methods that are not usually needed (like mutability, etc). So, it makes sense to keep and use the interface and not to combine them. But if there are cases where the methods only exist in the implementation (and not interface) due to the previous zk implementation. In such cases, we should pull up the relevant methods so that no casting is required. > Avoid casting MetadataCache to KRaftMetadataCache > ------------------------------------------------- > > Key: KAFKA-18555 > URL: https://issues.apache.org/jira/browse/KAFKA-18555 > Project: Kafka > Issue Type: Improvement > Reporter: PoAn Yang > Assignee: PoAn Yang > Priority: Major > > Since we remove ZkMetadataCache in > https://issues.apache.org/jira/browse/KAFKA-18373. There is only one > MetadataCache in code. We can consider to use KRaftMetadataCache directly. > ref: https://github.com/apache/kafka/pull/18553#issuecomment-2593078120 -- This message was sent by Atlassian Jira (v8.20.10#820010)