From user-return-12380-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Wed Dec 4 02:49:28 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 5E873180629 for ; Wed, 4 Dec 2019 03:49:28 +0100 (CET) Received: (qmail 28433 invoked by uid 500); 4 Dec 2019 02:49:26 -0000 Mailing-List: contact user-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@zookeeper.apache.org Delivered-To: mailing list user@zookeeper.apache.org Received: (qmail 28415 invoked by uid 99); 4 Dec 2019 02:49:24 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd2-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 04 Dec 2019 02:49:24 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd2-us-west.apache.org (ASF Mail Server at spamd2-us-west.apache.org) with ESMTP id 5B4981A31FD for ; Wed, 4 Dec 2019 02:49:24 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd2-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.1 X-Spam-Level: X-Spam-Status: No, score=0.1 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=0.2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd2-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cse.mrt.ac.lk Received: from mx1-ec2-va.apache.org ([10.40.0.8]) by localhost (spamd2-us-west.apache.org [10.40.0.9]) (amavisd-new, port 10024) with ESMTP id 4ZBqABXG-4Oh for ; Wed, 4 Dec 2019 02:49:23 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=209.85.208.50; helo=mail-ed1-f50.google.com; envelope-from=isuruboyagane.16@cse.mrt.ac.lk; receiver= Received: from mail-ed1-f50.google.com (mail-ed1-f50.google.com [209.85.208.50]) by mx1-ec2-va.apache.org (ASF Mail Server at mx1-ec2-va.apache.org) with ESMTPS id ECD3CBC536 for ; Wed, 4 Dec 2019 02:49:21 +0000 (UTC) Received: by mail-ed1-f50.google.com with SMTP id cm12so5178286edb.11 for ; Tue, 03 Dec 2019 18:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cse.mrt.ac.lk; s=google; h=mime-version:from:date:message-id:subject:to; bh=WuTlXW/TJEMlMIM7FZKUTX4R0DGhrSN/P2SA/1gVeKU=; b=aCn77J8Y3aHmjJzGoLl6IKI+ipvBTVWME+ZGo9BnO24mMWZiaAAI48SIUOhzg/ZsGl aasoTHL/VEPVQX44tAu3PoZ+nwSnvzqWylSnCGSoSbah/Rn2ADIEli1WVgOVYUOrjNlo hlWJx9cAPDZwrWkHKvTOvV3biQfnO0xVxrs6EXEsA7jyNkTnbT2NdLI2Fq6WC7FD/nJi RpXvMM4r9F/xWdUO+PZA50MWv4E2UhMA6EUKjynYMrnYMTsXIs5Z9zUCaUpKTf6V54rH xZ4wIPNcCw2dViWdQjAme1S72ABA/hi2TUoYCns0eQFmkSKWq1gVjF4JFaJtowxjCiDP zDeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=WuTlXW/TJEMlMIM7FZKUTX4R0DGhrSN/P2SA/1gVeKU=; b=lr9I1CGki6xgMcrE6T4FHA4PwBgdHp5vyKr8OioKj+VAYTM2EhjFIIKjoEnVRutRi0 q8Oep0WWO5mInzJluu4nFt9EEQ6iN45d1eUyTDy0ULxyhL7y+yoBopxrfdVGfXwqymFs YxO5NUX2zFOP/+9wCX4tNljpd9w2iLP4MTSov4RwvuxOAP+TIJSA0+PizPywbxtM5ani DU8hOzkhCjvBEeQuhb7mPqsN1PkjL46qhewH+P3rDVZaUQSQqbKBaJCYlpaSrZVE8jZE HK/HSVVT5ZIF+5KEIP8hqOgSXiDR6jg8hajci+NAY3hzZkZ9NZMGfx/wCSiE7B5aXNXc V8Ig== X-Gm-Message-State: APjAAAV6flrl31t6f8HLzvh3TejX/Gb+B/yDUg09OpC0Vq/4HdJ1Xvxc I7pq8q0qSnnhep57EvTiklM09hqUKvqmVM8Dz7yQII7/ X-Google-Smtp-Source: APXvYqxMZReFjtjwduqC9jDrwFpfFQ5APhTWGN2iu6CZiZ/lcSZF01qSmU5EJND/GeUh4cUWcuaUEMEp1un8LVVJacU= X-Received: by 2002:a17:906:3ec2:: with SMTP id d2mr649708ejj.251.1575427760366; Tue, 03 Dec 2019 18:49:20 -0800 (PST) MIME-Version: 1.0 From: Isuru Boyagane Date: Wed, 4 Dec 2019 08:19:08 +0530 Message-ID: Subject: Participant selection mechanism when implementing Java leader election using zookeeper. To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary="00000000000006c09e0598d7dc39" --00000000000006c09e0598d7dc39 Content-Type: text/plain; charset="UTF-8" I read about leader election using zookeeper. https://zookeeper.apache.org/doc/current/recipes.html#sc_leaderElection I have a small question ro ask. After a node creared "/election" node every node creates child nodes with sequential and ephemeral flags. In what condition nodes decide to select all the child nodes and elect smallest one as the leader. In other words "what prevents a slightly late node joining the election". Is it a timeout? If so how it is handled in Zookeeper internally? Please advise. Thank you. --00000000000006c09e0598d7dc39--