mutable_state_impl.go ×5

Frontier kind: Code frontier

unlabeled · c_588d85a21a89

9 tests · 9215 LOC · 257 files · introduces 0 tests · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
5 ranges24 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1963 ranges9215 lines · 257 files · Browse complete extent
All tests (intent)
9 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: 24 introduced LOC across 5 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 24 introduced LOC · 5 ranges

Open complete file

4638
4639 // Check for duplicate cancellation
4640 > if ok && ai.CancelRequested { mutable_state_impl.go
4641 ms.logWarn(mutableStateInvalidHistoryActionMsg, opTag,
4642 tag.WorkflowEventID(ms.GetNextEventID()),
4649
4650 // At this point we know this is a valid activity cancellation request
4651 > actCancelReqEvent := ms.hBuilder.AddActivityTaskCancelRequestedEvent(workflowTaskCompletedEventID, scheduledEventID) mutable_state_impl.go
4652 >
4653 > if err := ms.ApplyActivityTaskCancelRequestedEvent(actCancelReqEvent); err != nil {
4654 return nil, nil, err
4655 }
4656
4657 > return actCancelReqEvent, ai, nil mutable_state_impl.go
4658 }
4659
4739 func (ms *MutableStateImpl) ApplyActivityTaskCancelRequestedEvent(
4740 event *historypb.HistoryEvent,
4741 > ) error { mutable_state_impl.go
4742 > attributes := event.GetActivityTaskCancelRequestedEventAttributes()
4743 > scheduledEventID := attributes.GetScheduledEventId()
4744 > ai, ok := ms.GetActivityInfo(scheduledEventID)
4745 > if !ok {
4746 // This will only be called on active cluster if activity info is found in mutable state
4747 // Passive side logic should always have activity info in mutable state if this is called, as the only
4751 }
4752
4753 > ms.approximateSize -= ai.Size() mutable_state_impl.go
4754 >
4755 > ai.Version = event.GetVersion()
4756 >
4757 > // - We have the activity dispatched to worker.
4758 > // - The activity might not be heartbeat'ing, but the activity can still call RecordActivityHeartBeat()
4759 > // to see cancellation while reporting progress of the activity.
4760 > ai.CancelRequested = true
4761 >
4762 > ai.CancelRequestId = event.GetEventId()
4763 > ms.updateActivityInfos[ai.ScheduledEventId] = ai
4764 > ms.activityInfosUserDataUpdated[ai.ScheduledEventId] = struct{}{}
4765 > ms.approximateSize += ai.Size()
4766 > return nil
4767 }
4768