You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Vikas Singh (JIRA)" <ji...@apache.org> on 2019/06/11 20:58:00 UTC

[jira] [Created] (KAFKA-8525) Make log in Partion non-optional

Vikas Singh created KAFKA-8525:
----------------------------------

             Summary: 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


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)