Skip to content
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

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

pegasas
Copy link
Contributor

@pegasas pegasas commented May 12, 2024

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

image

@pegasas pegasas changed the title ~[Improvement][Master] Add Misfire policy control in schedule [Improvement][Master] Add Misfire policy control in schedule May 12, 2024
@SbloodyS SbloodyS requested a review from ruanwenjun May 13, 2024 06:33
@SbloodyS SbloodyS added improvement make more easy to user or prompt friendly 3.2.2 labels May 14, 2024
@SbloodyS SbloodyS added this to the 3.2.2 milestone May 14, 2024
DROP PROCEDURE modify_data_t_ds_audit_log_input_entry;

ALTER TABLE t_ds_schedules ADD COLUMN misfire_policy tinyint(4) NOT NULL;
Copy link
Member

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.

Comment on lines 88 to 100
switch (schedule.getMisfirePolicy()) {
case DONOTHING:
cronScheduleBuilder.withMisfireHandlingInstructionDoNothing();
break;
case FIREANDPROCEED:
cronScheduleBuilder.withMisfireHandlingInstructionFireAndProceed();
break;
case IGNOREMISFIRES:
default:
cronScheduleBuilder.withMisfireHandlingInstructionIgnoreMisfires();
break;
}

Copy link
Member

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"),
Copy link
Contributor

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 {
Copy link
Contributor

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

@qingwli
Copy link
Member

qingwli commented May 15, 2024

Mark

@pegasas pegasas force-pushed the issues/15986 branch 2 times, most recently from 867899b to 7284121 Compare May 15, 2024 08:27
Update dolphinscheduler-common/src/main/java/org/apache/dolphinscheduler/common/enums/MisfirePolicy.java

Co-authored-by: Wenjun Ruan <wenjun@apache.org>

fix
@github-actions github-actions bot added the UI ui and front end related label May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.2.2 backend improvement make more easy to user or prompt friendly UI ui and front end related
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Improvement][Master] Add Misfire policy control in schedule
6 participants