620
mutableState historyi.MutableState,
621
namespaceEntry *namespace.Namespace,
623
>
wfCloseTime, err := mutableState.GetWorkflowCloseTime(ctx)
624
>
if err != nil {
625
return nil, err
626
}
628
>
if err != nil {
629
return nil, err
630
}
632
>
executionInfo := mutableState.GetExecutionInfo()
633
>
stateTransitionCount := executionInfo.GetStateTransitionCount()
634
>
historySizeBytes := executionInfo.GetExecutionStats().GetHistorySize()
635
>
636
>
if base.SearchAttributes == nil {
637
base.SearchAttributes = &commonpb.SearchAttributes{
638
IndexedFields: make(map[string]*commonpb.Payload),
639
}
641
base.SearchAttributes.IndexedFields = make(map[string]*commonpb.Payload)
642
}
643
645
>
externalPayloadCount := executionInfo.GetExecutionStats().GetExternalPayloadCount()
646
>
externalPayloadSizeBytes := executionInfo.GetExecutionStats().GetExternalPayloadSize()
647
>
if externalPayloadCount > 0 {
648
externalPayloadCountPayload := sadefs.MustEncodeValue(externalPayloadCount, enumspb.INDEXED_VALUE_TYPE_INT)
649
externalPayloadSizeBytesPayload := sadefs.MustEncodeValue(externalPayloadSizeBytes, enumspb.INDEXED_VALUE_TYPE_INT)