workflow_resetter.go ×8

Frontier kind: Joint frontier

unlabeled · c_5e3ec34de88e

1 test · 4513 LOC · 196 files · introduces 1 test · 41 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges41 lines · 1 files
Tests
1 test

Contains — complete concept membership

All code (extent)
662 ranges4513 lines · 196 files · Browse complete extent
All tests (intent)
1 testBrowse 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.

1 test introduced at this concept.

Introduced code

Every collected source range enters the hierarchy at exactly one concept.

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

go.temporal.io/server/service/history/ndc/workflow_resetter.go 41 introduced LOC · 8 ranges

Open complete file

297 resetReason string,
298 allowResetWithPendingChildren bool,
299 > ) (Workflow, error) { workflow_resetter.go
300 >
301 > resetWorkflow, err := r.replayResetWorkflow(
302 > ctx,
303 > namespaceID,
304 > workflowID,
305 > baseRunID,
306 > baseBranchToken,
307 > baseRebuildLastEventID,
308 > baseRebuildLastEventVersion,
309 > resetRunID,
310 > requestID,
311 > )
312 > if err != nil {
313 return nil, err
314 }
315
316 // Reset expiration time
317 > resetMutableState := resetWorkflow.GetMutableState() workflow_resetter.go
318 >
319 > // if workflow was reset after it was expired - at this point expiration task will
320 > // already be fired since it is (re)created from the event, and event has old expiration time
321 > // generate workflow execution task. again. this time with proper expiration time
322 >
323 > if err := resetMutableState.RefreshExpirationTimeoutTask(ctx); err != nil {
324 return nil, err
325 }
326
327 > if resetMutableState.GetCurrentVersion() > resetWorkflowVersion { workflow_resetter.go
328 return nil, serviceerror.NewInternal("WorkflowResetter encountered version mismatch.")
329 }
330 > if err := resetMutableState.UpdateCurrentVersion( workflow_resetter.go
331 > resetWorkflowVersion,
332 > false,
333 > ); err != nil {
334 return nil, err
335 }
336
337 > if !allowResetWithPendingChildren && len(resetMutableState.GetPendingChildExecutionInfos()) > 0 { workflow_resetter.go
338 return nil, serviceerror.NewInvalidArgument("WorkflowResetter encountered pending child workflows.")
339 }
340
341 > if err := r.failWorkflowTask( workflow_resetter.go
342 > resetMutableState,
343 > baseRunID,
344 > baseRebuildLastEventID,
345 > baseRebuildLastEventVersion,
346 > resetRunID,
347 > resetReason,
348 > ); err != nil {
349 return nil, err
350 }
351
352 > if err := r.failInflightActivity( workflow_resetter.go
353 > resetMutableState.GetExecutionState().StartTime.AsTime(),
354 > resetMutableState,
355 > resetReason,
356 > ); err != nil {
357 return nil, err
358 }
359
360 > return resetWorkflow, nil workflow_resetter.go
361 }
362