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

Narayan Periwal commented on KAFKA-6681:
----------------------------------------

[~yuzhih...@gmail.com]

The partition read by the two consumers did not appear in any of the kafka 
broker logs. Partition number 1 of the topic renderCpmAms1 was being consumed 
by two consumer instances within a consumer group

The following are the log lines in the server logs related to this topic
{noformat}
[2018-03-14 05:01:53,456] INFO Partition [renderCpmAms1,10] on broker 1: 
Shrinking ISR for partition [renderCpmAms1,10] from 1,2,3 to 1,3 
(kafka.cluster.Partition)
[2018-03-14 05:02:14,122] INFO Partition [renderCpmAms1,10] on broker 1: 
Expanding ISR for partition renderCpmAms1-10 from 1,3 to 1,3,2 
(kafka.cluster.Partition)
[2018-03-14 05:01:52,376] INFO Partition [renderCpmAms1,9] on broker 15: 
Shrinking ISR for partition [renderCpmAms1,9] from 2,15,1 to 15,1 
(kafka.cluster.Partition)
[2018-03-14 05:02:14,193] INFO Partition [renderCpmAms1,9] on broker 15: 
Expanding ISR for partition renderCpmAms1-9 from 15,1 to 15,1,2 
(kafka.cluster.Partition)

[2018-03-14 05:02:17,510] INFO Partition [renderCpmAms1,11] on broker 2: 
Shrinking ISR for partition [renderCpmAms1,11] from 2,4,3 to 2,4 
(kafka.cluster.Partition)
[2018-03-14 05:02:17,530] INFO Partition [renderCpmAms1,11] on broker 2: Cached 
zkVersion [171] not equal to that in zookeeper, skip updating ISR 
(kafka.cluster.Partition)
{noformat}

Wondering, if this error or log line has any corelation with the issue.
{noformat}
[2018-03-14 05:02:17,530] INFO Partition [renderCpmAms1,11] on broker 2: Cached 
zkVersion [171] not equal to that in zookeeper, skip updating ISR 
(kafka.cluster.Partition)
{noformat}


> Two instances of kafka consumer reading the same partition within a consumer 
> group
> ----------------------------------------------------------------------------------
>
>                 Key: KAFKA-6681
>                 URL: https://issues.apache.org/jira/browse/KAFKA-6681
>             Project: Kafka
>          Issue Type: Bug
>          Components: consumer
>    Affects Versions: 0.10.2.1
>            Reporter: Narayan Periwal
>            Priority: Critical
>         Attachments: server-1.log, server-2.log
>
>
> We have seen this issue with the Kafka consumer, the new library that got 
> introduced in 0.9
> With this new client, the group management is done by kafka coordinator, 
> which is one of the kafka broker.
> We are using Kafka broker 0.10.2.1 and consumer client version is also 
> 0.10.2.1 
> The issue that we have faced is that, after rebalancing, some of the 
> partitions gets consumed by 2 instances within a consumer group, leading to 
> duplication of the entire partition data. Both the instances continue to read 
> until the next rebalancing, or the restart of those clients. 
> It looks like that a particular consumer goes on fetching the data from a 
> partition, but the broker is not able to identify this "stale" consumer 
> instance. 
> During this time, we also see the underreplicated partition metrics spiking. 
> We have hit this twice in production. Please look at it the earliest. 



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

Reply via email to