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 69E7110E53 for ; Sun, 1 Dec 2013 23:39:37 +0000 (UTC) Received: (qmail 10667 invoked by uid 500); 1 Dec 2013 23:39:36 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 10621 invoked by uid 500); 1 Dec 2013 23:39:36 -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 10448 invoked by uid 99); 1 Dec 2013 23:39:36 -0000 Received: from arcas.apache.org (HELO arcas.apache.org) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 01 Dec 2013 23:39:36 +0000 Date: Sun, 1 Dec 2013 23:39:36 +0000 (UTC) From: "Jun Rao (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (KAFKA-1154) replicas may not have consistent data after becoming follower 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-1154?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13836144#comment-13836144 ] Jun Rao commented on KAFKA-1154: -------------------------------- Attach a patch. Also made a minor change in KafkaApis to only expose data up to the high watermark to the debugger consumer. Data after the high watermark can be truncated and therefore could change after the consumer has read it. This fix will prevent the ReplicaVerificationTool to read stale data. > replicas may not have consistent data after becoming follower > ------------------------------------------------------------- > > Key: KAFKA-1154 > URL: https://issues.apache.org/jira/browse/KAFKA-1154 > Project: Kafka > Issue Type: Bug > Components: core > Affects Versions: 0.8.1 > Reporter: Jun Rao > Assignee: Jun Rao > Fix For: 0.8.1 > > Attachments: KAFKA-1154.patch > > > This is an issued introduced in KAFKA-1001. The issue is that in ReplicaManager.makeFollowers(), we truncate the log before marking the replica as the follower. New messages from the producer can still be added to the log after the log is truncated, but before the replica is marked as the follower. Those newly produced messages can actually be committed, which implies those truncated messages are also committed. However, the new leader is not guaranteed to have those truncated messages. -- This message was sent by Atlassian JIRA (v6.1#6144)