You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@streampark.apache.org by "xujiangfeng001 (via GitHub)" <gi...@apache.org> on 2023/06/27 15:58:37 UTC

[GitHub] [incubator-streampark] xujiangfeng001 commented on a diff in pull request #2809: [Feature][WIP][Service] flink cluster failure alarm&failover

xujiangfeng001 commented on code in PR #2809:
URL: https://github.com/apache/incubator-streampark/pull/2809#discussion_r1243990906


##########
streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml:
##########
@@ -133,6 +133,14 @@
              limit 1
     </select>
 
+    <select id="getJobByClusterId" resultType="java.lang.Integer" parameterType="java.lang.Long">
+        SELECT
+            count(1)
+        FROM t_flink_app
+        WHERE flink_cluster_id = #{clusterId}
+            limit 1
+    </select>
+

Review Comment:
   I have carefully considered here and it is indeed necessary to filter the status.
   
   I want to filter the job status that is not `add` or `cancelled`. I need to explain why it is necessary to filter out tasks that are not `add` or `cancelled`:
   
   Because during the execution of this SQL statement, jobs in other states can be considered running or preparing to run in the `flink cluster`, but it may be due to the issue of two scheduling threads being out of sync,unable to update the job status in a timely manner, it may not be possible to determine the affected jobs based on a certain status.
   
   What do you think of `getAffectedJobsByClusterId` regarding select id.



-- 
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: issues-unsubscribe@streampark.apache.org

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