funky-eyes commented on code in PR #7783:
URL: https://github.com/apache/incubator-seata/pull/7783#discussion_r2666800505


##########
core/src/main/java/org/apache/seata/core/rpc/netty/AbstractNettyRemotingClient.java:
##########
@@ -96,6 +98,11 @@ public abstract class AbstractNettyRemotingClient extends 
AbstractNettyRemoting
     protected final Condition mergeCondition = mergeLock.newCondition();
     protected volatile boolean isSending = false;
 
+    private final Runnable reconnectTask;
+    private AtomicBoolean timerStarted = new AtomicBoolean(false);

Review Comment:
   I'm not quite clear on the purpose of this PR. Currently, `timerStarted` is 
an instance variable and not shared, which means both RM and TM will each 
create their own `reconnectTask`. The `reconnectTask` itself is also an 
instance variable with no sharing.
   
   For the old logic, what is the point of adding `timerStarted`? Wouldn't it 
be better to unify the reconnect thread pool for both RM and TM into a single 
one, so that there is only one task per entity (one for RM and one for TM) 
instead of starting two separate thread pools?



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to