sandynz commented on code in PR #19782:
URL: https://github.com/apache/shardingsphere/pull/19782#discussion_r935290986


##########
shardingsphere-kernel/shardingsphere-data-pipeline/shardingsphere-data-pipeline-dialect/shardingsphere-data-pipeline-mysql/src/main/java/org/apache/shardingsphere/data/pipeline/mysql/ingest/client/MySQLClient.java:
##########
@@ -283,23 +286,23 @@ public void channelInactive(final ChannelHandlerContext 
ctx) {
             if (!running) {
                 return;
             }
-            if (reconnectTimes > 3) {
+            if (reconnectTimes.get() > 3) {
                 log.warn("exceeds the maximum number of retry times, 
lastBinlogEvent={}", lastBinlogEvent);
                 running = false;
                 return;
             }
             reconnect();
         }
-        
+    
         @Override
         public void exceptionCaught(final ChannelHandlerContext ctx, final 
Throwable cause) {
             running = false;
-            log.error("protocol resolution error", cause);
+            log.error("MySQLBinlogEventHandler: protocol resolution error, 
lastBinlogEvent={}", lastBinlogEvent, cause);
         }
-        
+    
         private void reconnect() {
-            reconnectTimes++;
-            log.info("reconnect mysql client, retryTimes={}", reconnectTimes);
+            int retryTimes = reconnectTimes.incrementAndGet();
+            log.info("reconnect MySQL client, retry times={}", retryTimes);

Review Comment:
   The log message is mixed with `:` and `=`, it's better to use unified format.



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