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

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

     [ https://issues.apache.org/jira/browse/KAFKA-10832?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jun Rao resolved KAFKA-10832.
-----------------------------
    Fix Version/s: 2.8.0
       Resolution: Fixed

Merged the PR to trunk.

> 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
>            Priority: Major
>             Fix For: 2.8.0
>
>
> 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)