lizhanhui commented on code in PR #8600:
URL: https://github.com/apache/rocketmq/pull/8600#discussion_r1758517916


##########
broker/src/main/java/org/apache/rocketmq/broker/offset/ConsumerOffsetManager.java:
##########
@@ -373,6 +374,25 @@ public void setDataVersion(DataVersion dataVersion) {
         this.dataVersion = dataVersion;
     }
 
+    public boolean loadDataVersion() {
+        String fileName = null;
+        try {
+            fileName = this.configFilePath();
+            String jsonString = MixAll.file2String(fileName);
+            if (jsonString != null) {
+                ConsumerOffsetManager obj = 
RemotingSerializable.fromJson(jsonString, ConsumerOffsetManager.class);
+                if (obj != null) {
+                    this.dataVersion = obj.dataVersion;
+                }
+                LOG.info("load consumer offset dataVersion success, " + 
fileName + " " + jsonString);

Review Comment:
   Log with formatter, not string concatenation: See 
https://medium.com/@mohanakrishnakavali/logging-efficiency-in-java-string-concatenation-vs-string-format-efa02055ddae



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to