mutable_state_impl.go ×3

Frontier kind: Code frontier

unlabeled · c_feca252364ae

71 tests · 3865 LOC · 164 files · introduces 0 tests · 10 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
3 ranges10 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
607 ranges3865 lines · 164 files · Browse complete extent
All tests (intent)
71 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: 10 introduced LOC across 3 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/workflow/mutable_state_impl.go 10 introduced LOC · 3 ranges

Open complete file

1234 }
1235
1236 > func (ms *MutableStateImpl) GetCloseVersion() (int64, error) { mutable_state_impl.go
1237 > // TODO: Remove this special handling for zombie workflow.
1238 > // This method should not be called for zombie workflow as it's not considered closed (though it's not running either).
1239 > //
1240 > // However, most callers in this codebase simply check if workflowIsRunning before calling this method, so we cloud reach here
1241 > // even if the workflow is zombie.
1242 > // Most callers are in task executor logic, and we should just prevent any task executor from running when workflow is in zombie state.
1243 > if ms.executionState.State == enumsspb.WORKFLOW_EXECUTION_STATE_ZOMBIE {
1244 return ms.GetLastWriteVersion()
1245 }
1247 // Do NOT use ms.IsWorkflowExecutionRunning() for the check.
1248 // Zombie workflow is not considered running but also not closed.
1249 > if ms.executionState.State != enumsspb.WORKFLOW_EXECUTION_STATE_COMPLETED { mutable_state_impl.go
1250 return common.EmptyVersion, serviceerror.NewInternalf("workflow still running, current state: %v", ms.executionState.State.String())
1251 }
1253 // if workflow is closing in the current transation,
1254 // then the last event is closed event and the event version is the close version
1255 > if lastEventVersion, ok := ms.hBuilder.LastEventVersion(); ok { mutable_state_impl.go
1256 return lastEventVersion, nil
1257 }