Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace DurableTask.Core.Entities.OperationFormat
/// <summary>
/// A request for execution of a batch of operations on an entity.
/// </summary>
public class OperationBatchRequest
public class EntityBatchRequest
Copy link
Collaborator

Choose a reason for hiding this comment

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

changing these names will necessitate a change in the extension, right?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The new naming is already reflected in the PRs that depend on this.
So, I only have to change anything if you object to this name change!

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Also, note that these classes were newly introduced in the feature branch. So, we don't have any released code that depends on it.

{
// NOTE: Actions must be serializable by a variety of different serializer types to support out-of-process execution.
// To ensure maximum compatibility, all properties should be public and settable by default.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ namespace DurableTask.Core.Entities.OperationFormat
/// <summary>
/// The results of executing a batch of operations on the entity out of process.
/// </summary>
public class OperationBatchResult
public class EntityBatchResult
{
// NOTE: Actions must be serializable by a variety of different serializer types to support out-of-process execution.
// To ensure maximum compatibility, all properties should be public and settable by default.
Expand Down
2 changes: 1 addition & 1 deletion src/DurableTask.Core/Entities/TaskEntity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ public abstract class TaskEntity
/// <summary>
/// Execute a batch of operations on an entity.
/// </summary>
public abstract Task<OperationBatchResult> ExecuteOperationBatchAsync(OperationBatchRequest operations, EntityExecutionOptions options);
public abstract Task<EntityBatchResult> ExecuteOperationBatchAsync(EntityBatchRequest operations, EntityExecutionOptions options);
}
}
4 changes: 2 additions & 2 deletions src/DurableTask.Core/Logging/LogEvents.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ void IEventSourceEvent.WriteEventSource() =>
/// </summary>
internal class EntityBatchExecuting : StructuredLogEvent, IEventSourceEvent
{
public EntityBatchExecuting(OperationBatchRequest request)
public EntityBatchExecuting(EntityBatchRequest request)
{
this.InstanceId = request.InstanceId;
this.OperationCount = request.Operations.Count;
Expand Down Expand Up @@ -1223,7 +1223,7 @@ void IEventSourceEvent.WriteEventSource() =>
/// </summary>
internal class EntityBatchExecuted : StructuredLogEvent, IEventSourceEvent
{
public EntityBatchExecuted(OperationBatchRequest request, OperationBatchResult result)
public EntityBatchExecuted(EntityBatchRequest request, EntityBatchResult result)
{
this.InstanceId = request.InstanceId;
this.OperationCount = request.Operations.Count;
Expand Down
4 changes: 2 additions & 2 deletions src/DurableTask.Core/Logging/LogHelper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -566,7 +566,7 @@ internal void RenewOrchestrationWorkItemFailed(TaskOrchestrationWorkItem workIte
/// Logs that an entity operation batch is about to start executing.
/// </summary>
/// <param name="request">The batch request.</param>
internal void EntityBatchExecuting(OperationBatchRequest request)
internal void EntityBatchExecuting(EntityBatchRequest request)
{
if (this.IsStructuredLoggingEnabled)
{
Expand All @@ -579,7 +579,7 @@ internal void EntityBatchExecuting(OperationBatchRequest request)
/// </summary>
/// <param name="request">The batch request.</param>
/// <param name="result">The batch result.</param>
internal void EntityBatchExecuted(OperationBatchRequest request, OperationBatchResult result)
internal void EntityBatchExecuted(EntityBatchRequest request, EntityBatchResult result)
{
if (this.IsStructuredLoggingEnabled)
{
Expand Down
8 changes: 4 additions & 4 deletions src/DurableTask.Core/TaskEntityDispatcher.cs
Original file line number Diff line number Diff line change
Expand Up @@ -800,10 +800,10 @@ void ProcessSendStartMessage(WorkItemEffects effects, OrchestrationRuntimeState

#endregion

async Task<OperationBatchResult> ExecuteViaMiddlewareAsync(Work workToDoNow, OrchestrationInstance instance, string serializedEntityState)
async Task<EntityBatchResult> ExecuteViaMiddlewareAsync(Work workToDoNow, OrchestrationInstance instance, string serializedEntityState)
{
// the request object that will be passed to the worker
var request = new OperationBatchRequest()
var request = new EntityBatchRequest()
{
InstanceId = instance.InstanceId,
EntityState = serializedEntityState,
Expand All @@ -828,7 +828,7 @@ await this.dispatchPipeline.RunAsync(dispatchContext, async _ =>
// Check to see if the custom middleware intercepted and substituted the orchestration execution
// with its own execution behavior, providing us with the end results. If so, we can terminate
// the dispatch pipeline here.
var resultFromMiddleware = dispatchContext.GetProperty<OperationBatchResult>();
var resultFromMiddleware = dispatchContext.GetProperty<EntityBatchResult>();
if (resultFromMiddleware != null)
{
return;
Expand All @@ -854,7 +854,7 @@ await this.dispatchPipeline.RunAsync(dispatchContext, async _ =>
dispatchContext.SetProperty(result);
});

var result = dispatchContext.GetProperty<OperationBatchResult>();
var result = dispatchContext.GetProperty<EntityBatchResult>();

this.logHelper.EntityBatchExecuted(request, result);

Expand Down