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 AD25710C3E for ; Mon, 3 Mar 2014 19:03:41 +0000 (UTC) Received: (qmail 20034 invoked by uid 500); 3 Mar 2014 19:03:41 -0000 Delivered-To: apmail-kafka-dev-archive@kafka.apache.org Received: (qmail 19999 invoked by uid 500); 3 Mar 2014 19:03:40 -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 19989 invoked by uid 99); 3 Mar 2014 19:03:40 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Mar 2014 19:03:40 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id 1EBA81D4B37; Mon, 3 Mar 2014 19:03:39 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============4861388835129257877==" MIME-Version: 1.0 Subject: Re: Review Request 17537: Patch for KAFKA-1028 From: "Guozhang Wang" To: "kafka" , "Andrew Olson" , "Guozhang Wang" Date: Mon, 03 Mar 2014 19:03:39 -0000 Message-ID: <20140303190339.10116.26835@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Guozhang Wang" X-ReviewGroup: kafka X-ReviewRequest-URL: https://reviews.apache.org/r/17537/ X-Sender: "Guozhang Wang" References: <20140130194538.21444.70000@reviews.apache.org> In-Reply-To: <20140130194538.21444.70000@reviews.apache.org> Reply-To: "Guozhang Wang" X-ReviewRequest-Repository: kafka --===============4861388835129257877== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/17537/#review35999 ----------------------------------------------------------- core/src/main/scala/kafka/admin/AdminUtils.scala "unclean leader" is a bit confusing, how about uncleanLeaderElectionEnabled? core/src/main/scala/kafka/controller/PartitionLeaderSelector.scala Not sure throwing an exception is the right behavior here? If unclean election is disabled, which means we choose consistency over availability, when ISR is empty we should keep the partition as offline from the clients until it is not empty. Throwing an exception will just halt the whole partition state change process, but may not necessarily resume when the ISR has changed. Could you confirm in your integration tests if this is the case? core/src/main/scala/kafka/server/ReplicaFetcherThread.scala I am not sure we need to check the unclean election flag here. If we can keep the partition as offline for clients in the controller phase, will that be sufficient since no data will be appended/consumed from these replica logs until that is unblocked? As for reading the configs, I agree that if we consider per-topic configs then we probably need to read it from ZK. - Guozhang Wang On Jan. 30, 2014, 7:45 p.m., Andrew Olson wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/17537/ > ----------------------------------------------------------- > > (Updated Jan. 30, 2014, 7:45 p.m.) > > > Review request for kafka. > > > Bugs: KAFKA-1028 > https://issues.apache.org/jira/browse/KAFKA-1028 > > > Repository: kafka > > > Description > ------- > > KAFKA-1028: per topic configuration of preference for consistency over availability > > > Diffs > ----- > > core/src/main/scala/kafka/admin/AdminUtils.scala a167756f0fd358574c8ccb42c5c96aaf13def4f5 > core/src/main/scala/kafka/common/NoReplicaOnlineException.scala a1e12794978adf79020936c71259bbdabca8ee68 > core/src/main/scala/kafka/controller/KafkaController.scala a0267ae2670e8d5f365e49ec0fa5db1f62b815bf > core/src/main/scala/kafka/controller/PartitionLeaderSelector.scala fd9200f3bf941aab54df798bb5899eeb552ea3a3 > core/src/main/scala/kafka/log/LogConfig.scala 0b32aeeffcd9d4755ac90573448d197d3f729749 > core/src/main/scala/kafka/server/KafkaConfig.scala 3c3aafc2b3f06fc8f3168a8a9c1e0b08e944c1ef > core/src/main/scala/kafka/server/ReplicaFetcherThread.scala 73e605eb31bc71642d48b0bb8bd1632fd70b9dca > core/src/test/scala/unit/kafka/integration/RollingBounceTest.scala b585f0ec0b1c402d95a3b34934dab7545dcfcb1f > core/src/test/scala/unit/kafka/integration/UncleanLeaderElectionTest.scala PRE-CREATION > core/src/test/scala/unit/kafka/server/KafkaConfigTest.scala 89c207a3f56c7a7711f8cee6fb277626329882a6 > core/src/test/scala/unit/kafka/utils/TestUtils.scala 426b1a7bea1d83a64081f2c6b672c88c928713b7 > > Diff: https://reviews.apache.org/r/17537/diff/ > > > Testing > ------- > > > Thanks, > > Andrew Olson > > --===============4861388835129257877==--