mutable_state_impl.go ×6

Frontier kind: Code frontier

unlabeled · c_78db9fca5d2b

3 tests · 9996 LOC · 263 files · introduces 0 tests · 28 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges28 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
2170 ranges9996 lines · 263 files · Browse complete extent
All tests (intent)
3 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.

2 files ranked by introduced lines: 28 introduced LOC across 7 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 25 introduced LOC · 6 ranges

Open complete file

4566 timeoutFailure *failurepb.Failure,
4567 retryState enumspb.RetryState,
4568 > ) (*historypb.HistoryEvent, error) { mutable_state_impl.go
4569 > opTag := tag.WorkflowActionActivityTaskTimedOut
4570 > if err := ms.checkMutability(opTag); err != nil {
4571 return nil, err
4572 }
4573 > timeoutType := timeoutFailure.GetTimeoutFailureInfo().GetTimeoutType() mutable_state_impl.go
4574 >
4575 > ai, ok := ms.GetActivityInfo(scheduledEventID)
4576 > if !ok || ai.StartedEventId != startedEventID || ((timeoutType == enumspb.TIMEOUT_TYPE_START_TO_CLOSE ||
4577 > timeoutType == enumspb.TIMEOUT_TYPE_HEARTBEAT) && ai.StartedEventId == common.EmptyEventID) {
4578 ms.logger.Warn(mutableStateInvalidHistoryActionMsg, opTag,
4579 tag.WorkflowEventID(ms.GetNextEventID()),
4586 }
4587
4588 > timeoutFailure.Cause = ai.RetryLastFailure mutable_state_impl.go
4589 >
4590 > if err := ms.addStartedEventForTransientActivity(scheduledEventID, nil); err != nil {
4591 return nil, err
4592 }
4593 > event := ms.hBuilder.AddActivityTaskTimedOutEvent( mutable_state_impl.go
4594 > scheduledEventID,
4595 > startedEventID,
4596 > timeoutFailure,
4597 > retryState,
4598 > )
4599 > if err := ms.ApplyActivityTaskTimedOutEvent(event); err != nil {
4600 return nil, err
4601 }
4602
4603 > return event, nil mutable_state_impl.go
4604 }
4605
4606 func (ms *MutableStateImpl) ApplyActivityTaskTimedOutEvent(
4607 event *historypb.HistoryEvent,
4608 > ) error { mutable_state_impl.go
4609 > attributes := event.GetActivityTaskTimedOutEventAttributes()
4610 > scheduledEventID := attributes.GetScheduledEventId()
4611 >
4612 > return ms.DeleteActivity(scheduledEventID)
4613 > }
4614
4615 func (ms *MutableStateImpl) AddActivityTaskCancelRequestedEvent(
go.temporal.io/server/service/history/timer_queue_active_task_executor.go 3 introduced LOC · 1 range

Open complete file

256 activityInfo, ok := mutableState.GetActivityInfo(timerSequenceID.EventID)
257 if !ok {
258 > // this case can happen since each activity can have 4 timers timer_queue_active_task_executor.go
259 > // and one of those 4 timers may have fired in this loop
260 > continue Loop
261 }
262