From user-return-11215-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Thu Jan 18 00:39:16 2018 Return-Path: X-Original-To: archive-asf-public@eu.ponee.io Delivered-To: archive-asf-public@eu.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by mx-eu-01.ponee.io (Postfix) with ESMTP id 098C918062C for ; Thu, 18 Jan 2018 00:39:16 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id ED281160C35; Wed, 17 Jan 2018 23:39:15 +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 3DA46160C25 for ; Thu, 18 Jan 2018 00:39:15 +0100 (CET) Received: (qmail 87066 invoked by uid 500); 17 Jan 2018 23:39:13 -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 87048 invoked by uid 99); 17 Jan 2018 23:39:13 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 17 Jan 2018 23:39:13 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 37C50C43A8 for ; Wed, 17 Jan 2018 23:39:13 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.879 X-Spam-Level: * X-Spam-Status: No, score=1.879 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (1024-bit key) header.d=jeffwidman.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id qJzO5tG1CHLq for ; Wed, 17 Jan 2018 23:39:12 +0000 (UTC) Received: from mail-it0-f51.google.com (mail-it0-f51.google.com [209.85.214.51]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 160715F1F0 for ; Wed, 17 Jan 2018 23:39:12 +0000 (UTC) Received: by mail-it0-f51.google.com with SMTP id w14so10714985itc.3 for ; Wed, 17 Jan 2018 15:39:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=jeffwidman.com; s=google; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=omInKljLlotMjVoH3MSBBsNwzCmZggl9OGqq39549FU=; b=Y+Ka8mAk5ndMIKmohgP3A2bUaC6A/ZNVZDnfduUy5gTV66LrNt7ikr0pkR2HF5cVW9 UC405EijIB0/9HdkZKvXoMqb8rSFJsKC+Ad3UjgkzOa2PAKVkYI2oI4IhuM1UiM11EjV NLj4yj4YeLyAbyhN9nOTxX1qkqeXTgan9qH7E= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=omInKljLlotMjVoH3MSBBsNwzCmZggl9OGqq39549FU=; b=ZvjwoPlErezn+hGSbzvAvFJvh1hM3ZEG5UMVh1F70ienjnDwwwMXstfRkhQxuENtZT bUKGZfCzSTvY9Svd1THuJHK18BqgQJc4PN8115tPhY+F6uNYKUrqOrpnQ7Oac1/k88It RCgDt7q3bGkmwhh9IP/01fyexbLLhmJKLJSaVrxC4XIiTFy7yUE5Rb7n8kzGjMvQkw4O N4oqgLLLNqJVqW7K8DBypOXU36vlUAsvMW0NjCF7VRLmE3jsm6AAhbLpz9J6AczoZYRw 3Go9SaYeyvN86EKRy+4C4W7SCaVgMAOshgX+6gLMkNrk+NhpUFQrdzCIUAkzy9rV6tDR lzBg== X-Gm-Message-State: AKwxytdZkWtprBulA34QD7azDT1L4CwtYKl02fJR4j7OsveK1z/+5wuO uxizfrNLbeQsB9yMz6tcdcrAKsEenaAvRK201a66gJPq X-Google-Smtp-Source: ACJfBoutyXEYHc9PM0hNJY/9BNcEKChLjxyB1lkDdo7gzl0nZUDIGWgsRt3jUUfAIaQOZ+lchSRGx4YwPfGjEFM1CBY= X-Received: by 10.36.22.130 with SMTP id a124mr25546885ita.12.1516232351143; Wed, 17 Jan 2018 15:39:11 -0800 (PST) MIME-Version: 1.0 Received: by 10.36.87.144 with HTTP; Wed, 17 Jan 2018 15:39:08 -0800 (PST) Received: by 10.36.87.144 with HTTP; Wed, 17 Jan 2018 15:39:08 -0800 (PST) In-Reply-To: References: From: Jeff Widman Date: Wed, 17 Jan 2018 15:39:08 -0800 Message-ID: Subject: Re: Why are ephemeral nodes written to disk? To: user@zookeeper.apache.org Content-Type: multipart/alternative; boundary="001a114453c2afeaa20563015a82" --001a114453c2afeaa20563015a82 Content-Type: text/plain; charset="UTF-8" Thank you. I did not realize sessions could continue even if the ensemble was shutdown. On Jan 17, 2018 3:28 PM, "Patrick Hunt" wrote: > On Tue, Jan 9, 2018 at 12:38 PM, Jeff Widman wrote: > > > Ephemeral nodes only exist for the life of the client session. > > > > As far as I understand, by definition, a client session ends when the > > entire zookeeper ensemble goes down. > > > > So I would expect that ephemeral nodes are only written to memory, not > > disk. The ephemeral nodes would be sync'd across machines as a client > > session can span multiple connections if a single zk server fails, but > once > > the ensemble is down there is no need to recover the ephemeral nodes from > > disk. > > > > However, when I looked at a zookeeper ensemble that is 99% ephemeral > nodes, > > I see a bunch of disk I/O from the zookeeper processes. So it appears > that > > ephemeral nodes are still written to disk... > > > > Why is this? > > > > Ephemeral znodes are treated just like persistent znodes in the sense that > a quorum of nodes need to agree to any change. As such the znode is written > to the transaction log. > > "a client session ends when the entire zookeeper ensemble goes down" > > is not correct. A client session ends either when a client closes it's > session explicitly or the ZK quorum leader decides that the session has > expired (which is based on the negotiated session timeout). Only while a > leader is active can a session be expired (or closed for that matter). When > you shutdown an ensemble the sessions are maintained. If you were to, for > example, shut down an ensemble for an hour and then restart it the sessions > would still be active. The clock would "reset" when the new leader was > elected. If the client session is still active the session would continue, > any ephemeral znodes would still exist. > > Patrick > > > > > > -- > > > > *Jeff Widman* > > jeffwidman.com | 740-WIDMAN-J (943-6265) > > <>< > > > --001a114453c2afeaa20563015a82--