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 0D88A200B98 for ; Mon, 3 Oct 2016 12:06:08 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 0C0D1160ADC; Mon, 3 Oct 2016 10:06:08 +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 51A5E160ACC for ; Mon, 3 Oct 2016 12:06:07 +0200 (CEST) Received: (qmail 81170 invoked by uid 500); 3 Oct 2016 10:06:01 -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 81142 invoked by uid 99); 3 Oct 2016 10:06:01 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 03 Oct 2016 10:06:01 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id BA67218014C; Mon, 3 Oct 2016 10:06:00 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.48 X-Spam-Level: X-Spam-Status: No, score=0.48 tagged_above=-999 required=6.31 tests=[HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id b_YcbRr_fN_D; Mon, 3 Oct 2016 10:05:57 +0000 (UTC) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id C271A5FB0B; Mon, 3 Oct 2016 10:05:56 +0000 (UTC) Received: by mail-wm0-f43.google.com with SMTP id b201so70905145wmb.0; Mon, 03 Oct 2016 03:05:56 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=Pz9Exm6BiyQ6YFLknYY8wTUiLY68Ee1l/pZsZTc7RcY=; b=RxnOSQc+hIyi9gYwk/WIDbl3oWQXfetS15vU9n+oR6K4KT05NySjCSv6G33qKZi6cD D1zmkW7eWX9chmCD+8BNmozKemLno6kxp2dSzakh4EIOYt/+6KU2cojO4/ZlcUK1rqJl zhqfxHplil2mCDaEtjIMlYQcl3WJVD8TIrwF18ElLBiss6brNpVrAd7QCTbdCm/wqmx/ Bh+uSgG7Yj8/VRoWhTeVNELvPBB7C8DeKLjbFienW2qwB8Q5gMoBbnb7xhdZC0HeuHx8 s9znslJQL/mQkxCwFYs6UvuJdDZkP7xVHMKfTR3JakgeYO9fCuUy1Zb8652hycSxaCiD CLsw== X-Gm-Message-State: AA6/9Rmaml3bowY3A5N9kZ+4ZUjoP/aKWK23s7Gwruk+j3zqooVkCWUvgZJpsq9fyUMc1Q== X-Received: by 10.194.58.81 with SMTP id o17mr13088518wjq.227.1475489150177; Mon, 03 Oct 2016 03:05:50 -0700 (PDT) Received: from fpj-mac.home (host86-190-177-115.range86-190.btcentralplus.com. [86.190.177.115]) by smtp.gmail.com with ESMTPSA id us3sm16998279wjb.32.2016.10.03.03.05.49 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 03 Oct 2016 03:05:49 -0700 (PDT) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 8.2 \(2104\)) Subject: Re: ZooKeeper clients does not handle new error codes properly From: Flavio Junqueira In-Reply-To: <954962C10920654BBE157862C7272BA540FB134A@szxeml561-mbx.china.huawei.com> Date: Mon, 3 Oct 2016 11:05:47 +0100 Cc: "user@zookeeper.apache.org" Content-Transfer-Encoding: quoted-printable Message-Id: <178974D4-5557-4946-A804-D6818BD98A7B@apache.org> References: <954962C10920654BBE157862C7272BA540FB134A@szxeml561-mbx.china.huawei.com> To: dev@zookeeper.apache.org X-Mailer: Apple Mail (2.2104) archived-at: Mon, 03 Oct 2016 10:06:08 -0000 Hi Arshad, It makes sense to me. What if we convert unknown server errors to = KeeperException.SystemErrorException? This is a generic error and it = extends KeeperException. I don't see it as a big issue to make this change, but others may feel = differently. If we do it, then we will need a release note pointing out = the change of behavior. -Flavio > On 03 Oct 2016, at 08:54, Mohammad arshad = wrote: >=20 > Hi All, > In Zookeeper rolling upgrade scenario where server is new but client = is old, when sever sends error code which is not understood by a client, = client throws IllegalArgumentException. Generally = IllegalArgumentException is not handled by any of the ZK applications. = It is too generic. How to handle this scenario in ZK applications? > My understanding is instead of throwing IllegalArgumentException we = should throw a subclass of KeeperException, for example = InvalidErrorCodeException, so that zk apps can take more specific = action. > Any thoughts? >=20 > Thanks > -Arshad >=20