operation_mode_validator.go ×1

Frontier kind: Code frontier

unlabeled · c_0cc5eace9753

71 tests · 1890 LOC · 85 files · introduces 0 tests · 22 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
1 range22 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
265 ranges1890 lines · 85 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: 22 introduced LOC across 1 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/operation_mode_validator.go 22 introduced LOC · 1 range

Open complete file

166
167 switch mode {
168 > case ConflictResolveWorkflowModeUpdateCurrent: operation_mode_validator.go
169 > // update current record
170 > // 1. reset workflow only ->
171 > // reset workflow cannot be zombie
172 > // 2. reset workflow & new workflow ->
173 > // reset workflow cannot be created / running / zombie,
174 > // new workflow cannot be zombie
175 > // 3. current workflow & reset workflow ->
176 > // current workflow cannot be created / running,
177 > // reset workflow cannot be zombie
178 > // 4. current workflow & reset workflow & new workflow ->
179 > // current workflow cannot be created / running,
180 > // reset workflow cannot be created / running / zombie,
181 > // new workflow cannot be zombie
182 >
183 > // TODO remove case 1 & 2 support once 2DC is deprecated
184 > // it is ok that currentWorkflowMutation is null, only for 2 DC case
185 > // NDC should always require current workflow for CAS
186 > // Note: current workflow mutation can be in zombie state, for the update
187 >
188 > // case 1 & 2
189 > if currentWorkflowState == nil {
190 // case 1
191 if newWorkflowState == nil {