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

Fix 1296 #1149

Closed
wants to merge 1 commit into from
Closed

Fix 1296 #1149

wants to merge 1 commit into from

Conversation

MikeStall
Copy link
Contributor

Fix Azure/azure-functions-host#1296
Need to be resilient to clock adjustment in the middle of a running function.
Tactical fix - eventually this all gets removed and replaced with AI

@@ -156,7 +156,8 @@ public void Validate()
{
if (this.StartTime > this.EndTime)
{
throw new InvalidOperationException("End Time must be greater than start time");
// This can happen in rare cases if the clock adjusts while the function is running.
this.EndTime = this.StartTime.AddMilliseconds(1);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we prefer this over removing the validation check altogether? I suppose the dashboard or other consumers might throw up if they see endtime < starttime.

@MikeStall
Copy link
Contributor Author

merged

@MikeStall MikeStall closed this May 23, 2017
@MikeStall MikeStall deleted the bug1296 branch July 20, 2017 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WebJob host shut down unexpectedly resulting in ThreadAbortException in functions
4 participants