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


##########
server/src/main/java/org/apache/seata/server/cluster/raft/RaftStateMachine.java:
##########
@@ -141,6 +147,7 @@ public RaftStateMachine(String group) {
             EXECUTES.put(REMOVE_GLOBAL_SESSION, new 
RemoveGlobalSessionExecute());
             EXECUTES.put(UPDATE_BRANCH_SESSION_STATUS, new 
UpdateBranchSessionExecute());
             EXECUTES.put(RELEASE_BRANCH_SESSION_LOCK, new 
BranchReleaseLockExecute());
+            RESYNC_METADATA_POOL.scheduleAtFixedRate(() -> 
syncCurrentNodeInfo(group), 10, 10, TimeUnit.SECONDS);

Review Comment:
   > Is it necessary to try to synchronize at startup? Since the node will 
always synchronize at `onStartFollowing`
   
   Because of the onStartFollowing synchronization may have accidents, 
resulting in the lack of successful synchronization, there is a need to have a 
timed task to compensate for this, in the future, this timed task may also be 
used as a synchronization of some dynamic metadata, because there is no need to 
synchronize the dynamic information, so it seems to be some redundancy of this 
timed task.
   
因为在onStartFollowing同步时可能出现意外,导致没有同步成功,需要有一个定时任务进行补偿,未来这个定时任务也可能用作一些动态metadata的同步,因为现在不需要动态信息同步,所以显得这个定时任务有一些多余。



-- 
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: notifications-unsubscr...@seata.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscr...@seata.apache.org
For additional commands, e-mail: notifications-h...@seata.apache.org

Reply via email to