Skip to content

Commit

Permalink
Adds ExecutionInfo reference to InternalWorkflowMutation #2530 (#2531)
Browse files Browse the repository at this point in the history
This enables the underlying store to have access to the ExecutionInfo on the Mutation object without having to do deserialization
  • Loading branch information
mastermanu authored Feb 23, 2022
1 parent faf1b3e commit 1a1aa2f
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion common/persistence/cassandra/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func applyWorkflowMutationBatch(
namespaceID,
workflowID,
runID,
workflowMutation.ExecutionInfo,
workflowMutation.ExecutionInfoBlob,
workflowMutation.ExecutionState,
workflowMutation.ExecutionStateBlob,
workflowMutation.NextEventID,
Expand Down
3 changes: 2 additions & 1 deletion common/persistence/execution_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,7 @@ func (m *executionManagerImpl) SerializeWorkflowMutation(
UpsertRequestCancelInfos: make(map[int64]*commonpb.DataBlob),
UpsertSignalInfos: make(map[int64]*commonpb.DataBlob),

ExecutionInfo: input.ExecutionInfo,
ExecutionState: input.ExecutionState,

DeleteActivityInfos: input.DeleteActivityInfos,
Expand All @@ -476,7 +477,7 @@ func (m *executionManagerImpl) SerializeWorkflowMutation(
NextEventID: input.NextEventID,
}

result.ExecutionInfo, err = m.serializer.WorkflowExecutionInfoToBlob(input.ExecutionInfo, enumspb.ENCODING_TYPE_PROTO3)
result.ExecutionInfoBlob, err = m.serializer.WorkflowExecutionInfoToBlob(input.ExecutionInfo, enumspb.ENCODING_TYPE_PROTO3)
if err != nil {
return nil, err
}
Expand Down
3 changes: 2 additions & 1 deletion common/persistence/persistenceInterface.go
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,8 @@ type (
WorkflowID string
RunID string

ExecutionInfo *commonpb.DataBlob
ExecutionInfo *persistencespb.WorkflowExecutionInfo
ExecutionInfoBlob *commonpb.DataBlob
ExecutionState *persistencespb.WorkflowExecutionState
ExecutionStateBlob *commonpb.DataBlob
NextEventID int64
Expand Down
2 changes: 1 addition & 1 deletion common/persistence/size.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ func statusOfInternalWorkflowMutation(
return nil
}

executionInfoSize := sizeOfBlob(mutation.ExecutionInfo)
executionInfoSize := sizeOfBlob(mutation.ExecutionInfoBlob)
executionStateSize := sizeOfBlob(mutation.ExecutionStateBlob)

activityInfoCount := len(mutation.UpsertActivityInfos)
Expand Down
2 changes: 1 addition & 1 deletion common/persistence/sql/execution_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ func applyWorkflowMutationTx(
tx,
namespaceID,
workflowID,
workflowMutation.ExecutionInfo,
workflowMutation.ExecutionInfoBlob,
workflowMutation.ExecutionState,
workflowMutation.NextEventID,
lastWriteVersion,
Expand Down

0 comments on commit 1a1aa2f

Please sign in to comment.