ruanwenjun commented on code in PR #15987:
URL: 
https://github.com/apache/dolphinscheduler/pull/15987#discussion_r1599708296


##########
dolphinscheduler-dao/src/main/resources/sql/upgrade/3.2.2_schema/mysql/dolphinscheduler_ddl.sql:
##########
@@ -53,4 +53,6 @@ END;
 d//
 delimiter ;
 CALL modify_data_t_ds_audit_log_input_entry;
-DROP PROCEDURE modify_data_t_ds_audit_log_input_entry;
\ No newline at end of file
+DROP PROCEDURE modify_data_t_ds_audit_log_input_entry;
+
+ALTER TABLE t_ds_schedules ADD COLUMN misfire_policy tinyint(4) NOT NULL;

Review Comment:
   Need to refresh the history data.



##########
dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/MisfirePolicy.java:
##########
@@ -0,0 +1,52 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *    http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.dolphinscheduler.common.enums;
+
+import com.baomidou.mybatisplus.annotation.EnumValue;
+
+/**
+ * misfire policy when using quartz scheduler
+ */
+public enum MisfirePolicy {
+
+    /**
+     * 0 ending process when some tasks failed.
+     * 1 continue running when some tasks failed.
+     **/
+    IGNOREMISFIRES(-1, "ignoremisfires"),
+    DEFAULT(0, "default"),
+    FIREANDPROCEED(1, "fireandproceed"),
+    DONOTHING(2, "donothing");
+
+    MisfirePolicy(int code, String descp) {
+        this.code = code;
+        this.descp = descp;
+    }
+
+    @EnumValue
+    private final int code;
+    private final String descp;
+
+    public int getCode() {
+        return code;
+    }
+
+    public String getDescp() {
+        return descp;
+    }
+}

Review Comment:
   The misfire policy is a concept in DS, quartz is just a implementation, we 
will have other implementations in the future, don't keep it same with quartz.
   
   ```suggestion
   public enum MisfirePolicy {
   
       EXACTLY_ONCE("All misfired schedule trigger will be handle"),
       KEEP_LATEST("Only handle the latest misfired schedule trigger"),
       DROP_MISFIRED("Will drop the misfired schedule trigger"),
       ;
   
       MisfirePolicy(int code, String descp) {
           this.code = code;
           this.descp = descp;
       }
   
       @EnumValue
       private final int code;
       private final String descp;
   
       public int getCode() {
           return code;
       }
   
       public String getDescp() {
           return descp;
       }
   }
   ```
   



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