zookeeper-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [zookeeper] lvfangmin commented on a change in pull request #849: ZOOKEEPER-3305: Add Quorum Packet metrics
Date Fri, 15 Mar 2019 05:30:56 GMT
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

Mime
View raw message