From dev-return-79237-archive-asf-public=cust-asf.ponee.io@zookeeper.apache.org Fri Mar 15 05:31:00 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 [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 99A97180784 for ; Fri, 15 Mar 2019 06:30:59 +0100 (CET) Received: (qmail 56649 invoked by uid 500); 15 Mar 2019 05:30:58 -0000 Mailing-List: contact dev-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 dev@zookeeper.apache.org Received: (qmail 55746 invoked by uid 99); 15 Mar 2019 05:30:57 -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; Fri, 15 Mar 2019 05:30:57 +0000 From: GitBox To: dev@zookeeper.apache.org Subject: [GitHub] [zookeeper] lvfangmin commented on a change in pull request #849: ZOOKEEPER-3305: Add Quorum Packet metrics Message-ID: <155262785658.31787.2841469841226508708.gitbox@gitbox.apache.org> Date: Fri, 15 Mar 2019 05:30:56 -0000 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit lvfangmin commented on a change in pull request #849: ZOOKEEPER-3305: Add Quorum Packet metrics URL: https://github.com/apache/zookeeper/pull/849#discussion_r265853321 ########## File path: zookeeper-server/src/main/java/org/apache/zookeeper/server/quorum/LearnerHandler.java ########## @@ -155,12 +176,42 @@ public synchronized boolean check(long time) { private SyncLimitCheck syncLimitCheck = new SyncLimitCheck(); + private static class MarkerQuorumPacket extends QuorumPacket { + long time; + MarkerQuorumPacket(long time) { + this.time = time; + } + + @Override + public int hashCode() { + return Objects.hash(super.hashCode(), time); Review comment: This is a private class used for tracking, won't change super fields, time is the only changing variable here, so only need to hash time here. ---------------------------------------------------------------- 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