519
// conflict path can surface it without loading ExecutionInfo. Backfill in memory for records
520
// written before that change so the next persist writes it through.
521
>
if dbRecord.ExecutionState.FirstExecutionRunId == "" && dbRecord.ExecutionInfo.FirstExecutionRunId != "" {
mutable_state_impl.go
522
dbRecord.ExecutionState.FirstExecutionRunId = dbRecord.ExecutionInfo.FirstExecutionRunId
523
}
524
525
>
mutableState.approximateSize += dbRecord.ExecutionState.Size() - mutableState.executionState.Size()
mutable_state_impl.go
526
>
mutableState.executionState = dbRecord.ExecutionState
527
>
mutableState.approximateSize += dbRecord.ExecutionInfo.Size() - mutableState.executionInfo.Size()
528
>
mutableState.executionInfo = dbRecord.ExecutionInfo
529
>
530
>
// StartTime was moved from ExecutionInfo to executionState
531
>
if mutableState.executionState.StartTime == nil && dbRecord.ExecutionInfo.StartTime != nil {
532
mutableState.executionState.StartTime = dbRecord.ExecutionInfo.StartTime
533
}
534
536
>
mutableState.timeSource,
537
>
mutableState.shard.GenerateTaskIDs,
538
>
common.EmptyVersion,
539
>
dbRecord.NextEventId,
540
>
dbRecord.BufferedEvents,
541
>
mutableState.metricsHandler,
542
>
mutableState.config.MaximumEventBatchSizeInBytes,
543
>
)
544
>
mutableState.currentVersion = common.EmptyVersion
545
>
mutableState.bufferEventsInDB = dbRecord.BufferedEvents
546
>
mutableState.stateInDB = dbRecord.ExecutionState.State
547
>
mutableState.nextEventIDInDB = dbRecord.NextEventId
548
>
mutableState.dbRecordVersion = dbRecordVersion
549
>
mutableState.checksum = dbRecord.Checksum
550
>
mutableState.initVersionedTransitionInDB()
551
>
552
>
if len(dbRecord.Checksum.GetValue()) > 0 {
553
switch {
554
case mutableState.shouldInvalidateCheckum():