transaction_manager_existing_workflow.go ×6

Frontier kind: Code frontier

unlabeled · c_461d8e21c6b8

2 tests · 2918 LOC · 142 files · introduces 0 tests · 24 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
6 ranges24 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
446 ranges2918 lines · 142 files · Browse complete extent
All tests (intent)
2 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 6 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/ndc/transaction_manager_existing_workflow.go 24 introduced LOC · 6 ranges

Open complete file

444 var newMutableState historyi.MutableState
445 if newWorkflow != nil {
446 > // newWorkflow is only set when a current workflow exists (dispatchForExistingWorkflow skips transaction_manager_existing_workflow.go
447 > // the new run when the current record is missing), so suppressing against it is safe.
448 > newWorkflowPolicy, err = newWorkflow.SuppressBy(
449 > currentWorkflow,
450 > )
451 > if err != nil {
452 return err
453 }
454 > if !r.bypassVersionSemanticsCheck && newWorkflowPolicy != historyi.TransactionPolicyPassive { transaction_manager_existing_workflow.go
455 return serviceerror.NewInternal("transactionMgrForExistingWorkflow conflictResolveAsZombie encountered new workflow policy not being passive")
456 }
458 // sanity check if new workflow is already created
459 // since workflow resend can have already created the new workflow
460 > newExecutionInfo := newWorkflow.GetMutableState().GetExecutionInfo() transaction_manager_existing_workflow.go
461 > newExecutionState := newWorkflow.GetMutableState().GetExecutionState()
462 > newWorkflowExists, err := r.transactionMgr.CheckWorkflowExists(
463 > ctx,
464 > namespace.ID(newExecutionInfo.NamespaceId),
465 > newExecutionInfo.WorkflowId,
466 > newExecutionState.RunId,
467 > archetypeID,
468 > )
469 > if err != nil {
470 return err
471 }
472 > if newWorkflowExists { transaction_manager_existing_workflow.go
473 // new workflow already exists, do not create again
474 newContext = nil
475 newMutableState = nil
477 // new workflow does not exist, continue
478 newContext = newWorkflow.GetContext()
482
483 if currentWorkflow != nil {
484 > // release lock on current workflow, since current cluster maybe the active cluster transaction_manager_existing_workflow.go
485 > // and events maybe reapplied to current workflow
486 > currentWorkflow.GetReleaseFn()(nil)
487 > currentWorkflow = nil
488 > }
489
490 return targetWorkflow.GetContext().ConflictResolveWorkflowExecution(