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
2 changes: 1 addition & 1 deletion chasm/tree.go
Original file line number Diff line number Diff line change
Expand Up @@ -1184,7 +1184,7 @@ func unmarshalProto(

value := reflect.New(valueT.Elem())

if dataBlob == nil {
if dataBlob == nil || len(dataBlob.Data) == 0 {
// If the original data is the zero value of its type, the dataBlob loaded from persistence layer will be nil.
// But we know for component & data nodes, they won't get persisted in the first place if there's no data,
// so it must be a zero value.
Expand Down
4 changes: 1 addition & 3 deletions service/history/workflow/mutable_state_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -2615,9 +2615,7 @@ func (ms *MutableStateImpl) ApplyWorkflowExecutionStartedEvent(
root, ok := ms.chasmTree.(*chasm.Node)
softassert.That(ms.logger, ok, "chasmTree cast failed")

validationContext := chasm.NewContext(context.Background(), root)
_, err := root.Component(validationContext, chasm.ComponentRef{})
if common.IsNotFoundError(err) {
if root.Archetype() == "" {
mutableContext := chasm.NewMutableContext(context.Background(), root)
root.SetRootComponent(chasmworkflow.NewWorkflow(mutableContext, chasm.NewMSPointer(ms)))
}
Expand Down
Loading