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

Change schedules default catchup window to 1 year #4332

Merged
merged 2 commits into from
May 12, 2023
Merged

Conversation

dnr
Copy link
Member

@dnr dnr commented May 12, 2023

What changed?
Change default catchup window to 1 year (will only affect newly created schedules)

Why?
Better match user expectations: we shouldn't skip runs for short slowness/unavailability, other parts of temporal always attempt to catch up

How did you test it?

Potential risks

Is hotfix candidate?

@dnr dnr requested a review from a team as a code owner May 12, 2023 20:13
Copy link
Contributor

@MichaelSnowden MichaelSnowden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you describe exactly what this will do? If I create a schedule to run something at the highest frequency possible (maybe every minute I don't know), but I disable the schedule feature (not sure if / how this is possible), and then I forget about it, and then a year goes by and I turn on schedules again because I have a new use case, will that mean we will execute that old workflow thousands of times to catch up?

Copy link
Contributor

@MichaelSnowden MichaelSnowden left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, actually, it looks like this is the exact same behavior as Airflow (catchup by default, up to a year), so it makes sense that our users would expect it, even if it seems a bit dangerous.

@dnr
Copy link
Member Author

dnr commented May 12, 2023

If you disabled the schedule worker for a long time and had a running schedule then yes, it could try to start a large number of runs. Depending on the overlap policy, it would be either 1 (default "skip" policy) or max 1000 (sequentially) or max 1000 (in parallel). That's not a thing that anyone should do, though

@dnr dnr merged commit aca0d91 into temporalio:master May 12, 2023
@dnr dnr deleted the sched53 branch May 12, 2023 22:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants