mutable_state_impl.go ×21

Frontier kind: Code frontier

unlabeled · c_937f658ef40a

247 tests · 4307 LOC · 168 files · introduces 0 tests · 35 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
21 ranges35 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
742 ranges4307 lines · 168 files · Browse complete extent
All tests (intent)
247 testsBrowse complete intent

Neighbourhood graph

The orange circle is the focus. Violet and green circles are every ancestor and descendant, broader and narrower, at any distance; blue squares and pink diamonds are the introduced files and exact introduced tests of every visible concept, not only the focus's. Arrows point from broader to narrower concepts and bridge only concepts omitted from this view. Undirected links show source or test introduction. Concept and file size follows LOC; exact test nodes use test-count units.

Introduced files, introduced tests, and structurally relevant concept specialization

In the embedded map, ordinary wheel input scrolls the page; use the visible controls to zoom and drag to pan. Open the full-screen map for canvas navigation: wheel pans, Ctrl/Command plus wheel zooms, and arrow keys pan when this region is focused. On touch screens, open the full-screen map to pan or pinch. If JavaScript or WebGL is unavailable, use the native relationship evidence on this page.

Graph controls are ready.

Interactive rendering requires JavaScript and WebGL. Use the native relationship evidence on this page while the interactive map is unavailable.

Native relationship evidence

Every exact file and test below is linked only from the concept that introduces it.

Introduced tests

Every collected test enters the hierarchy at exactly one concept.

No tests are introduced at this concept. Its intent tests are introduced by other concepts.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

1 file ranked by introduced lines: 35 introduced LOC across 21 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 35 introduced LOC · 21 ranges

Open complete file

7902 }
7903
7904 > currentVersionedTransition := ms.CurrentVersionedTransition() mutable_state_impl.go
7905 > for activityId := range ms.activityInfosUserDataUpdated {
7906 ms.updateActivityInfos[activityId].LastUpdateVersionedTransition = currentVersionedTransition
7907 }
7908 > for timerId := range ms.timerInfosUserDataUpdated { mutable_state_impl.go
7909 ms.updateTimerInfos[timerId].LastUpdateVersionedTransition = currentVersionedTransition
7910 }
7911 > for _, childInfo := range ms.updateChildExecutionInfos { mutable_state_impl.go
7912 childInfo.LastUpdateVersionedTransition = currentVersionedTransition
7913 }
7914 > for _, cancelInfo := range ms.updateRequestCancelInfos { mutable_state_impl.go
7915 cancelInfo.LastUpdateVersionedTransition = currentVersionedTransition
7916 }
7917 > for _, signalInfo := range ms.updateSignalInfos { mutable_state_impl.go
7918 signalInfo.LastUpdateVersionedTransition = currentVersionedTransition
7919 }
7922 // signal requestedID.
7923 // Deletion of signalRequestID is not replicated today, so we can even drop the check on deleteSignalRequestedIDs
7924 > if len(ms.updateSignalRequestedIDs) != 0 || len(ms.deleteSignalRequestedIDs) != 0 { mutable_state_impl.go
7925 ms.executionInfo.SignalRequestIdsLastUpdateVersionedTransition = currentVersionedTransition
7926 }
7927
7928 > for updateID := range ms.updateInfoUpdated { mutable_state_impl.go
7929 ms.executionInfo.UpdateInfos[updateID].LastUpdateVersionedTransition = currentVersionedTransition
7930 }
7931
7932 > if ms.workflowTaskUpdated { mutable_state_impl.go
7933 ms.executionInfo.WorkflowTaskLastUpdateVersionedTransition = currentVersionedTransition
7934 }
7935
7936 > if ms.visibilityUpdated { mutable_state_impl.go
7937 ms.executionInfo.VisibilityLastUpdateVersionedTransition = currentVersionedTransition
7938 }
7939
7940 > if ms.executionStateUpdated { mutable_state_impl.go
7941 ms.executionState.LastUpdateVersionedTransition = currentVersionedTransition
7942 }
7943
7944 > if ms.timeSkippingInfoUpdated && ms.executionInfo.TimeSkippingInfo != nil { mutable_state_impl.go
7945 ms.executionInfo.TimeSkippingInfo.LastUpdateVersionedTransition = currentVersionedTransition
7946 }
8061 }
8062
8063 > var tombstones []*persistencespb.StateMachineTombstone mutable_state_impl.go
8064 > if ms.stateMachineNode != nil {
8065 > opLog, err := ms.stateMachineNode.OpLog()
8066 > if err != nil {
8067 panic(fmt.Sprintf("Failed to get HSM operation log: %v", err))
8068 }
8069
8070 > for _, op := range opLog { mutable_state_impl.go
8071 if deleteOp, ok := op.(hsm.DeleteOperation); ok {
8072 path := deleteOp.Path()
8095 }
8096
8097 > for scheduledEventID := range ms.deleteActivityInfos { mutable_state_impl.go
8098 tombstones = append(tombstones, &persistencespb.StateMachineTombstone{
8099 StateMachineKey: &persistencespb.StateMachineTombstone_ActivityScheduledEventId{
8102 })
8103 }
8104 > for timerID := range ms.deleteTimerInfos { mutable_state_impl.go
8105 tombstones = append(tombstones, &persistencespb.StateMachineTombstone{
8106 StateMachineKey: &persistencespb.StateMachineTombstone_TimerId{
8109 })
8110 }
8111 > for initiatedEventId := range ms.deleteChildExecutionInfos { mutable_state_impl.go
8112 tombstones = append(tombstones, &persistencespb.StateMachineTombstone{
8113 StateMachineKey: &persistencespb.StateMachineTombstone_ChildExecutionInitiatedEventId{
8116 })
8117 }
8118 > for initiatedEventId := range ms.deleteRequestCancelInfos { mutable_state_impl.go
8119 tombstones = append(tombstones, &persistencespb.StateMachineTombstone{
8120 StateMachineKey: &persistencespb.StateMachineTombstone_RequestCancelInitiatedEventId{
8123 })
8124 }
8125 > for initiatedEventId := range ms.deleteSignalInfos { mutable_state_impl.go
8126 tombstones = append(tombstones, &persistencespb.StateMachineTombstone{
8127 StateMachineKey: &persistencespb.StateMachineTombstone_SignalExternalInitiatedEventId{
8130 })
8131 }
8132 > for chasmNodePath := range chasmNodesMutation.DeletedNodes { mutable_state_impl.go
8133 tombstones = append(tombstones, &persistencespb.StateMachineTombstone{
8134 StateMachineKey: &persistencespb.StateMachineTombstone_ChasmNodePath{
8142 // which is not supported by today's DB schema.
8143 // TODO: we don't delete updateInfo today. Track them here when we do.
8144 > currentVersionedTransition := ms.CurrentVersionedTransition() mutable_state_impl.go
8145 >
8146 > tombstoneBatch := &persistencespb.StateMachineTombstoneBatch{
8147 > VersionedTransition: currentVersionedTransition,
8148 > StateMachineTombstones: tombstones,
8149 > }
8150 > // As an optimization, we only track the first empty tombstone batch. So we can know the start point of the tombstone batch
8151 > if len(tombstones) > 0 || len(ms.executionInfo.SubStateMachineTombstoneBatches) == 0 {
8152 > ms.executionInfo.SubStateMachineTombstoneBatches = append(ms.executionInfo.SubStateMachineTombstoneBatches, tombstoneBatch)
8153 > }
8154
8155 > ms.totalTombstones += len(tombstones) mutable_state_impl.go
8156 > ms.capTombstoneCount()
8157 }
8158