You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rocketmq.apache.org by "fuyou001 (via GitHub)" <gi...@apache.org> on 2023/06/09 23:17:43 UTC

[GitHub] [rocketmq] fuyou001 commented on a diff in pull request #6724: [RIP-64] Heartbeat Optimization

fuyou001 commented on code in PR #6724:
URL: https://github.com/apache/rocketmq/pull/6724#discussion_r1224879597


##########
remoting/src/main/java/org/apache/rocketmq/remoting/protocol/heartbeat/HeartbeatData.java:
##########
@@ -53,9 +56,38 @@ public void setConsumerDataSet(Set<ConsumerData> consumerDataSet) {
         this.consumerDataSet = consumerDataSet;
     }
 
+    public int getHeartbeatFingerprint() {
+        return heartbeatFingerprint;
+    }
+
+    public void setHeartbeatFingerprint(int heartbeatFingerprint) {
+        this.heartbeatFingerprint = heartbeatFingerprint;
+    }
+
+    public boolean isWithoutSub() {
+        return isWithoutSub;
+    }
+
+    public void setWithoutSub(boolean withoutSub) {
+        isWithoutSub = withoutSub;
+    }
+
     @Override
     public String toString() {
         return "HeartbeatData [clientID=" + clientID + ", producerDataSet=" + producerDataSet
             + ", consumerDataSet=" + consumerDataSet + "]";
     }
+
+    public int computeHeartbeatFingerprint() {
+        HeartbeatData heartbeatDataCopy = JSON.parseObject(JSON.toJSONString(this), HeartbeatData.class);

Review Comment:
   the performance issues in the code, especially when there is a large MQ cluster and many subscribed topics



-- 
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.

To unsubscribe, e-mail: commits-unsubscribe@rocketmq.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org