[ 
https://issues.apache.org/jira/browse/KAFKA-8525?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16865789#comment-16865789
 ] 

Vikas Singh commented on KAFKA-8525:
------------------------------------

#2 was already done as part of KAFKA-8457. This Jira will only track the first 
case above in description.

> Make log in Partion non-optional
> --------------------------------
>
>                 Key: KAFKA-8525
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8525
>             Project: Kafka
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 2.3.0
>            Reporter: Vikas Singh
>            Assignee: Vikas Singh
>            Priority: Minor
>
> While moving log out of replica to partition as part of KAFKA-8457 cleaned a 
> bunch of code by removing code like "if (!localReplica) throw), there are 
> still couple of additional cleanups that can be done:
>  # The log object in Partition can be made non-optional. As it doesn't make 
> sense to have a partition w/o log. Here is comment on PR for KAFKA-8457: 
> {{I think it shouldn't be possible to have a Partition without a 
> corresponding Log. Once this is merged, I think we can look into whether we 
> can replace the optional log field in this class with a concrete instance.}}
>  # The LocalReplica class can be removed simplifying replica class. Here is 
> another comment on the PR: {{it might be possible to turn Replica into a 
> trait and then let Log implement it directly. Then we could get rid of 
> LocalReplica. That would also help us clean up RemoteReplica, since the usage 
> of LogOffsetMetadata only makes sense for the local replica.}}
> Creating this JIRA to track these refactoring tasks for future.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to