You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@kafka.apache.org by "Kowshik Prakasam (Jira)" <ji...@apache.org> on 2020/12/09 19:54:00 UTC

[jira] [Created] (KAFKA-10832) Recovery logic is using incorrect ProducerStateManager instance when updating producers

Kowshik Prakasam created KAFKA-10832:
----------------------------------------

             Summary: Recovery logic is using incorrect ProducerStateManager instance when updating producers 
                 Key: KAFKA-10832
                 URL: https://issues.apache.org/jira/browse/KAFKA-10832
             Project: Kafka
          Issue Type: Bug
            Reporter: Kowshik Prakasam
            Assignee: Kowshik Prakasam


The bug is that from within {{Log.updateProducers(…)}}, the code operates on the {{producerStateManager}} attribute of the {{Log}} instance instead of operating on an input parameter. Please see [this|https://github.com/apache/kafka/blob/1d84f543678c4c08800bc3ea18c04a9db8adf7e4/core/src/main/scala/kafka/log/Log.scala#L1464] LOC where it calls {{producerStateManager.prepareUpdate}} thus accessing the attribute from the {{Log}} object (see [this|https://github.com/apache/kafka/blob/1d84f543678c4c08800bc3ea18c04a9db8adf7e4/core/src/main/scala/kafka/log/Log.scala#L251]). This looks unusual particularly for {{Log.loadProducersFromLog(...)}} [path|https://github.com/apache/kafka/blob/1d84f543678c4c08800bc3ea18c04a9db8adf7e4/core/src/main/scala/kafka/log/Log.scala#L956]. Here I believe we should be using the instance passed to the method, rather than the attribute from the {{Log}} instance.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)