From notifications-return-1864-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Tue Sep 17 03:50:45 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 6D96B180638 for ; Tue, 17 Sep 2019 05:50:45 +0200 (CEST) Received: (qmail 25861 invoked by uid 500); 17 Sep 2019 03:50:44 -0000 Mailing-List: contact notifications-help@zookeeper.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@zookeeper.apache.org Delivered-To: mailing list notifications@zookeeper.apache.org Received: (qmail 25843 invoked by uid 99); 17 Sep 2019 03:50:44 -0000 Received: from ec2-52-202-80-70.compute-1.amazonaws.com (HELO gitbox.apache.org) (52.202.80.70) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Sep 2019 03:50:44 +0000 From: GitBox To: notifications@zookeeper.apache.org Subject: [GitHub] [zookeeper] hanm opened a new pull request #1092: ZOOKEEPER-3548: Redundant zxid check in SnapStream.isValidSnapshot. Message-ID: <156869224422.6318.1902805194553530817.gitbox@gitbox.apache.org> Date: Tue, 17 Sep 2019 03:50:44 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit hanm opened a new pull request #1092: ZOOKEEPER-3548: Redundant zxid check in SnapStream.isValidSnapshot. URL: https://github.com/apache/zookeeper/pull/1092 `Util.getZxidFromName` is called twice in `SnapStream.isValidSnapshot`, and the second call is redundant: there is no way the check would return false when the second call of `Util.getZxidFromName` is executed as otherwise the code would already return false in the first call of `Util.getZxidFromName`. No test as the logic is fairly obvious (and the logic is not well testable, in first place). ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: users@infra.apache.org With regards, Apache Git Services