Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 8E130200BE4 for ; Wed, 21 Dec 2016 16:12:00 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 8CB43160B3A; Wed, 21 Dec 2016 15:12:00 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id D5728160B0C for ; Wed, 21 Dec 2016 16:11:59 +0100 (CET) Received: (qmail 88831 invoked by uid 500); 21 Dec 2016 15:11:58 -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 88812 invoked by uid 99); 21 Dec 2016 15:11:58 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Dec 2016 15:11:58 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 872862C1F56 for ; Wed, 21 Dec 2016 15:11:58 +0000 (UTC) Date: Wed, 21 Dec 2016 15:11:58 +0000 (UTC) From: "Ismael Juma (JIRA)" To: dev@kafka.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (KAFKA-4229) Controller can't start after several zk expired event MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Wed, 21 Dec 2016 15:12:00 -0000 [ https://issues.apache.org/jira/browse/KAFKA-4229?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Ismael Juma updated KAFKA-4229: ------------------------------- Fix Version/s: 0.10.2.0 > Controller can't start after several zk expired event > ----------------------------------------------------- > > Key: KAFKA-4229 > URL: https://issues.apache.org/jira/browse/KAFKA-4229 > Project: Kafka > Issue Type: Bug > Components: controller > Affects Versions: 0.9.0.0, 0.9.0.1, 0.10.0.0, 0.10.0.1 > Reporter: Pengwei > Assignee: Pengwei > Labels: reliability > Fix For: 0.10.2.0 > > > We found the controller not started after several zk expired event in our test environment. By analysing the log, I found the controller will handle the ephemeral node data delete event first and then the zk expired event , then the controller will gone. > I can reproducer it on my develop env: > 1. set up a one broker and one zk env, specify a very large zk timeout (20s) > 2. stop the broker and remove the zk's /broker/ids/0 directory > 3. restart the broker and make a breakpoint in the zk client's event thread to queue the delete event. > 4. after the /controller node gone the breakpoint will hit. > 5. expired the current session(suspend the send thread) and create a new session s2 > 6. resume the event thread, then the controller will handle LeaderChangeListener.handleDataDeleted and become leader > 7. then controller will handle SessionExpirationListener.handleNewSession, it resign the controller and elect, but when elect it found the /controller node is exist and not become the leader. But the /controller node is created by current session s2 will not remove. So the controller is gone -- This message was sent by Atlassian JIRA (v6.3.4#6332)