-
Notifications
You must be signed in to change notification settings - Fork 4.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Improvement][Master] Add Misfire policy control in schedule #15987
base: dev
Are you sure you want to change the base?
Conversation
...inscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/MisfirePolicy.java
Outdated
Show resolved
Hide resolved
DROP PROCEDURE modify_data_t_ds_audit_log_input_entry; | ||
|
||
ALTER TABLE t_ds_schedules ADD COLUMN misfire_policy tinyint(4) NOT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Need to refresh the history data.
switch (schedule.getMisfirePolicy()) { | ||
case DONOTHING: | ||
cronScheduleBuilder.withMisfireHandlingInstructionDoNothing(); | ||
break; | ||
case FIREANDPROCEED: | ||
cronScheduleBuilder.withMisfireHandlingInstructionFireAndProceed(); | ||
break; | ||
case IGNOREMISFIRES: | ||
default: | ||
cronScheduleBuilder.withMisfireHandlingInstructionIgnoreMisfires(); | ||
break; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this PR finished? how can we set this property?
* 0 ending process when some tasks failed. | ||
* 1 continue running when some tasks failed. | ||
**/ | ||
IGNOREMISFIRES(-1, "ignoremisfires"), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask Why does code
starts from -1?
/** | ||
* misfire policy when using quartz scheduler | ||
*/ | ||
public enum MisfirePolicy { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is the granularity of this policy, server level or scheduling level? If it is a scheduling level, is a corresponding front end needed to allow users to set it?
Also, doc needs to be updated
Mark |
867899b
to
7284121
Compare
Update dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/MisfirePolicy.java Co-authored-by: Wenjun Ruan <wenjun@apache.org> fix
Purpose of the pull request
fix: #15986
Brief change log
Now our trigger are configured in fixed misfire instruction.
We can let each cronjob to choose theirselves.
Verify this pull request