Return-Path: X-Original-To: apmail-kafka-dev-archive@www.apache.org Delivered-To: apmail-kafka-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 02344CF96 for ; Fri, 1 Nov 2013 17:28:01 +0000 (UTC) Received: (qmail 15821 invoked by uid 500); 1 Nov 2013 17:27:32 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 15743 invoked by uid 500); 1 Nov 2013 17:27:24 -0000 Mailing-List: contact dev-help@kafka.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@kafka.apache.org Delivered-To: mailing list dev@kafka.apache.org Received: (qmail 15718 invoked by uid 99); 1 Nov 2013 17:27:22 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 01 Nov 2013 17:27:22 +0000 Date: Fri, 1 Nov 2013 17:27:22 +0000 (UTC) From: "Neha Narkhede (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Work started] (KAFKA-1097) Race condition while reassigning low throughput partition leads to incorrect ISR information in zookeeper MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/KAFKA-1097?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Work on KAFKA-1097 started by Neha Narkhede. > Race condition while reassigning low throughput partition leads to incorrect ISR information in zookeeper > ---------------------------------------------------------------------------------------------------------- > > Key: KAFKA-1097 > URL: https://issues.apache.org/jira/browse/KAFKA-1097 > Project: Kafka > Issue Type: Bug > Components: controller > Affects Versions: 0.8 > Reporter: Neha Narkhede > Assignee: Neha Narkhede > Priority: Critical > Fix For: 0.8.1 > > Attachments: KAFKA-1097.patch, KAFKA-1097_2013-10-29_10:49:45.patch, KAFKA-1097_2013-10-30_21:46:00.patch, KAFKA-1097_2013-10-31_10:37:29.patch, KAFKA-1097_2013-11-01_09:55:33.patch > > > While moving partitions, the controller moves the old replicas through the following state changes - > ONLINE -> OFFLINE -> NON_EXISTENT > During the offline state change, the controller removes the old replica and writes the updated ISR to zookeeper and notifies the leader. Note that it doesn't notify the old replicas to stop fetching from the leader (to be fixed in KAFKA-1032). During the non-existent state change, the controller does not write the updated ISR or replica list to zookeeper. Right after the non-existent state change, the controller writes the new replica list to zookeeper, but does not update the ISR. So an old replica can send a fetch request after the offline state change, essentially letting the leader add it back to the ISR. The problem is that if there is no new data coming in for the partition and the old replica is fully caught up, the leader cannot remove it from the ISR. That lets a non existent replica live in the ISR at least until new data comes in to the partition -- This message was sent by Atlassian JIRA (v6.1#6144)