Dyqer commented on code in PR #15190:
URL: 
https://github.com/apache/dolphinscheduler/pull/15190#discussion_r1400103282


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/CommandMapper.xml:
##########
@@ -43,7 +43,7 @@
     <select id="queryCommandPageBySlot" 
resultType="org.apache.dolphinscheduler.dao.entity.Command">
         select *
         from t_ds_command
-        where id % #{masterCount} = #{thisMasterSlot}
+        where unix_timestamp(update_time) % #{masterCount} = #{thisMasterSlot}

Review Comment:
   For example, if the database has two active-active instance, they will 
config mysql as below
   set auto_increment_increment = 2
   set first instance auto_increment_offset = 0
   set second instance auto_increment_offset = 1
   
   first database id will be 0, 2, 4, 6, 8
   and second database id will be 1, 3, 4, 7, 9



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