transaction_manager_existing_workflow.go ×7

Frontier kind: Code frontier

unlabeled · c_4b45783e12b6

3 tests · 2827 LOC · 141 files · introduces 0 tests · 36 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
7 ranges36 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
425 ranges2827 lines · 141 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.

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

go.temporal.io/server/service/history/ndc/transaction_manager_existing_workflow.go 36 introduced LOC · 7 ranges

Open complete file

212
213 if !isWorkflowRebuilt {
214 > return r.executeTransaction( transaction_manager_existing_workflow.go
215 > ctx,
216 > nDCTransactionPolicyUpdateAsZombie,
217 > currentWorkflow,
218 > targetWorkflow,
219 > newWorkflow,
220 > archetypeID,
221 > )
222 > }
223
224 return r.executeTransaction(
272 newWorkflow Workflow,
273 archetypeID chasm.ArchetypeID,
275 >
276 > targetPolicy, err := suppressTargetPolicy(targetWorkflow, currentWorkflow)
277 > if err != nil {
278 return err
279 }
280 > if !r.bypassVersionSemanticsCheck && targetPolicy != historyi.TransactionPolicyPassive { transaction_manager_existing_workflow.go
281 return serviceerror.NewInternal("transactionMgrForExistingWorkflow updateAsZombie encountered target workflow policy not being passive")
282 }
283
284 > var newContext historyi.WorkflowContext transaction_manager_existing_workflow.go
285 > var newMutableState historyi.MutableState
286 > var newTransactionPolicy *historyi.TransactionPolicy
287 > if newWorkflow != nil {
288 // newWorkflow is only set when a current workflow exists (dispatchForExistingWorkflow skips
289 // the new run when the current record is missing), so suppressing against it is safe.
325 }
326
327 > if currentWorkflow != nil { transaction_manager_existing_workflow.go
328 // release lock on current workflow, since current cluster maybe the active cluster
329 // and events maybe reapplied to current workflow
332 }
333
334 > return targetWorkflow.GetContext().UpdateWorkflowExecutionWithNew( transaction_manager_existing_workflow.go
335 > ctx,
336 > r.shardContext,
337 > persistence.UpdateWorkflowModeBypassCurrent,
338 > newContext,
339 > newMutableState,
340 > historyi.TransactionPolicyPassive,
341 > newTransactionPolicy,
342 > )
343 }
344
529 )
530
531 > case nDCTransactionPolicyUpdateAsZombie: transaction_manager_existing_workflow.go
532 > return r.updateAsZombie(
533 > ctx,
534 > currentWorkflow,
535 > targetWorkflow,
536 > newWorkflow,
537 > archetypeID,
538 > )
539
540 case nDCTransactionPolicySuppressCurrentAndUpdateAsCurrent: