You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Andrew Schofield (Jira)" <ji...@apache.org> on 2026/09/21 11:58:00 UTC

[jira] [Resolved] (KAFKA-21106) Share consumer leaks ShareCompletedFetch when two fetches for the same partition are merged before collection

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

Andrew Schofield resolved KAFKA-21106.
--------------------------------------
    Resolution: Fixed

> Share consumer leaks ShareCompletedFetch when two fetches for the same partition are merged before collection
> -------------------------------------------------------------------------------------------------------------
>
>                 Key: KAFKA-21106
>                 URL: https://issues.apache.org/jira/browse/KAFKA-21106
>             Project: Kafka
>          Issue Type: Bug
>            Reporter: Apoorv Mittal
>            Assignee: Apoorv Mittal
>            Priority: Blocker
>             Fix For: 4.4.0
>
>
> ShareConsumeRequestManager.fetch() fetches on every poll() regardless of whether the previous fetch response for a partition was collected, so two completed fetches for the same partition can end up queued at once. ShareFetchCollector then merges them via ShareInFlightBatch.merge(), which copied the absorbed batch's records but never cleared them. That batch's ShareCompletedFetch leaks forever in ShareFetchBuffer.pendingAcknowledgementFetches, along with its retained records.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)