Skip to content

Optimize Continue As New And Solve Missed Raised Events - #251

Merged
Chris Gillum (cgillum) merged 8 commits into
Azure:masterfrom
adarsh1:master
Jan 23, 2019
Merged

Optimize Continue As New And Solve Missed Raised Events#251
Chris Gillum (cgillum) merged 8 commits into
Azure:masterfrom
adarsh1:master

Conversation

@adarsh1

Copy link
Copy Markdown
Member

This PR aims to optimize ContinueAsNew so that an orchestration continues in memory in the dispatcher if it can instead of enqueueing a new task message.

With this Events Raised After a continueAsNew has been executed will also be collected and carried over to the next iteration of the orchestration. This a feature that can be opted out of by specifying SkipEventsOnContinuation as true in the OrchestrationService.

@adarsh1

Copy link
Copy Markdown
MemberAuthor

@cgillum

Copy link
Copy Markdown
Member

Note: this fixes Azure/azure-functions-durable-extension#67

@cgillumChris Gillum (cgillum) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I'm super-excited to have this change! Relatively minor CR feedback.

Comment threadTest/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs Outdated
Comment threadTest/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs Outdated
Comment threadsrc/DurableTask.AzureStorage/AzureStorageOrchestrationService.cs Outdated
Comment threadsrc/DurableTask.Core/Command/OrchestrationCompleteOrchestratorAction.cs Outdated
Comment threadsrc/DurableTask.Core/TaskOrchestrationContext.cs Outdated
Comment threadsrc/DurableTask.Core/Command/OrchestrationCompleteOrchestratorAction.cs Outdated
Comment threadsrc/DurableTask.Core/TaskOrchestrationExecutor.cs Outdated
Comment threadtest/DurableTask.ServiceBus.Tests/ServiceBusOrchestrationServiceTests.cs Outdated
Comment threadTest/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs Outdated

@cgillumChris Gillum (cgillum) left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Looks great! Thanks for making these changes.

Comment threadsrc/DurableTask.ServiceBus/ServiceBusOrchestrationService.cs Outdated
@adarsh1

Copy link
Copy Markdown
MemberAuthor

Need to add one more change for the azurestorageprovider which is to also commit the old runtime state if it is instance store backed

Comment threadsrc/DurableTask.AzureStorage/AzureStorageOrchestrationService.cs Outdated
Comment threadsrc/DurableTask.AzureStorage/AzureStorageOrchestrationService.cs Outdated

namespace DurableTask.Core.Command
{

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nit: extra newline

Comment threadsrc/DurableTask.Core/Command/OrchestrationCompleteOrchestratorAction.cs Outdated
continuedAsNewMessage = null;

TraceHelper.TraceInstance(
TraceEventType.Verbose,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

indenting

Comment threadsrc/DurableTask.Core/IOrchestrationService.cs Outdated
Comment threadsrc/DurableTask.Core/TaskOrchestrationDispatcher.cs Outdated
Comment threadsrc/DurableTask.AzureStorage/Tracking/ITrackingStore.cs Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

Sign up for freeto 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.

4 participants

@adarsh1@cgillum@simonporter@timjl