execution_manager.go ×8

Frontier kind: Code frontier

unlabeled · c_40ce8c693521

98 tests · 4348 LOC · 166 files · introduces 0 tests · 59 LOC · 1 file

Introduces — evidence that enters the hierarchy at this concept

Code
8 ranges59 lines · 1 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
814 ranges4348 lines · 166 files · Browse complete extent
All tests (intent)
98 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: 59 introduced LOC across 8 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/common/persistence/execution_manager.go 59 introduced LOC · 8 ranges

Open complete file

313 ctx context.Context,
314 request *ConflictResolveWorkflowExecutionRequest,
315 > ) (_ *ConflictResolveWorkflowExecutionResponse, retErr error) { execution_manager.go
316 >
317 > var rollback historySizeRollback
318 > defer rollback.revertOnError(&retErr)
319 >
320 > resetSnapshot := request.ResetWorkflowSnapshot
321 > newSnapshot := request.NewWorkflowSnapshot
322 > currentMutation := request.CurrentWorkflowMutation
323 >
324 > resetWorkflowXDCKVs, resetWorkflowEvents, resetWorkflowHistoryDiff, err := m.serializeWorkflowEventBatches(
325 > ctx,
326 > request.ShardID,
327 > request.ResetWorkflowSnapshot.ExecutionInfo,
328 > request.ResetWorkflowEvents,
329 > )
330 > if err != nil {
331 return nil, err
332 }
333 > rollback.add(resetSnapshot.ExecutionInfo.ExecutionStats, resetWorkflowHistoryDiff.SizeDiff) execution_manager.go
334 >
335 > var newWorkflowXDCKVs map[XDCCacheKey]XDCCacheValue
336 > var newWorkflowEvents []*InternalAppendHistoryNodesRequest
337 > var newWorkflowHistoryDiff *HistoryStatistics
338 > if newSnapshot != nil {
339 newWorkflowXDCKVs, newWorkflowEvents, newWorkflowHistoryDiff, err = m.serializeWorkflowEventBatches(
340 ctx,
349 }
350
351 > var currentWorkflowXDCKVs map[XDCCacheKey]XDCCacheValue execution_manager.go
352 > var currentWorkflowEvents []*InternalAppendHistoryNodesRequest
353 > var currentWorkflowHistoryDiff *HistoryStatistics
354 > if currentMutation != nil {
355 currentWorkflowXDCKVs, currentWorkflowEvents, currentWorkflowHistoryDiff, err = m.serializeWorkflowEventBatches(
356 ctx,
365 }
366
367 > if err := ValidateConflictResolveWorkflowModeState( execution_manager.go
368 > request.Mode,
369 > resetSnapshot,
370 > newSnapshot,
371 > currentMutation,
372 > ); err != nil {
373 return nil, err
374 }
375
376 > serializedResetWorkflowSnapshot, err := m.SerializeWorkflowSnapshot(&resetSnapshot) execution_manager.go
377 > if err != nil {
378 return nil, err
379 }
380 > var serializedCurrentWorkflowMutation *InternalWorkflowMutation execution_manager.go
381 > if currentMutation != nil {
382 serializedCurrentWorkflowMutation, err = m.SerializeWorkflowMutation(currentMutation)
383 if err != nil {
385 }
386 }
387 > var serializedNewWorkflowMutation *InternalWorkflowSnapshot execution_manager.go
388 > if newSnapshot != nil {
389 serializedNewWorkflowMutation, err = m.SerializeWorkflowSnapshot(newSnapshot)
390 if err != nil {
393 }
394
395 > archetypeID, _ := m.assertAndConvertArchetypeID(request.ArchetypeID, "ConflictResolveWorkflowExecution") execution_manager.go
396 > newRequest := &InternalConflictResolveWorkflowExecutionRequest{
397 > ShardID: request.ShardID,
398 > RangeID: request.RangeID,
399 >
400 > Mode: request.Mode,
401 >
402 > ArchetypeID: archetypeID,
403 >
404 > ResetWorkflowSnapshot: *serializedResetWorkflowSnapshot,
405 > ResetWorkflowEventsNewEvents: resetWorkflowEvents,
406 >
407 > NewWorkflowSnapshot: serializedNewWorkflowMutation,
408 > NewWorkflowEventsNewEvents: newWorkflowEvents,
409 >
410 > CurrentWorkflowMutation: serializedCurrentWorkflowMutation,
411 > CurrentWorkflowEventsNewEvents: currentWorkflowEvents,
412 > }
413 >
414 > err = m.persistence.ConflictResolveWorkflowExecution(ctx, newRequest)
415 > switch err.(type) {
416 case nil:
417 m.addXDCCacheKV(resetWorkflowXDCKVs)