You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by GitBox <gi...@apache.org> on 2022/10/25 07:10:59 UTC

[GitHub] [dolphinscheduler] BongBongBang commented on a diff in pull request #12506: [Improvement][BatchQuery] Batch query ProcessDefinitions belongs to need failover ProcessInstance.

BongBongBang commented on code in PR #12506:
URL: https://github.com/apache/dolphinscheduler/pull/12506#discussion_r1004087187


##########
dolphinscheduler-dao/src/main/resources/org/apache/dolphinscheduler/dao/mapper/ProcessDefinitionLogMapper.xml:
##########
@@ -50,6 +50,16 @@
         where code = #{code}
         and version = #{version}
     </select>
+    <select id="queryByDefinitionCodesAndVersion" resultType="org.apache.dolphinscheduler.dao.entity.ProcessDefinitionLog"
+            parameterType="org.apache.dolphinscheduler.dao.entity.ProcessInstance">
+        select
+        <include refid="baseSql"/>
+        from t_ds_process_definition_log
+        where
+        <foreach collection="processInstances" item="item" separator="or">

Review Comment:
   Ok, I took this change advice from wenjun. Let me check the sql explain. If it doesn't use index in reality, we have to query `ProcessDefinitionLog` one by one here.



-- 
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: commits-unsubscribe@dolphinscheduler.apache.org

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