raw_task_converter.go ×15

Frontier kind: Code frontier

unlabeled · c_76e33d582165

4 tests · 6572 LOC · 223 files · introduces 0 tests · 63 LOC · 3 files

Introduces — evidence that enters the hierarchy at this concept

Code
18 ranges63 lines · 3 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
1284 ranges6572 lines · 223 files · Browse complete extent
All tests (intent)
4 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.

3 files ranked by introduced lines: 63 introduced LOC across 18 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/history/replication/raw_task_converter.go 56 introduced LOC · 15 ranges

Open complete file

360 return nil, err
361 }
362 > if currentVersionHistory == nil { raw_task_converter.go
363 return nil, nil
364 }
365
366 > var events *commonpb.DataBlob raw_task_converter.go
367 > var eventsBatches []*commonpb.DataBlob
368 > if config.ReplicationMultipleBatches() {
369 eventsBatches = currentEvents
370 > } else { raw_task_converter.go
371 > if len(currentEvents) != 1 {
372 return nil, serviceerror.NewInternal("replicatorQueueProcessor encountered more than 1 NDC raw event batch")
373 }
374 > events = currentEvents[0] raw_task_converter.go
375 }
376
377 > return &replicationspb.ReplicationTask{ raw_task_converter.go
378 > TaskType: enumsspb.REPLICATION_TASK_TYPE_HISTORY_V2_TASK,
379 > SourceTaskId: taskInfo.TaskID,
380 > Attributes: &replicationspb.ReplicationTask_HistoryTaskAttributes{
381 > HistoryTaskAttributes: &replicationspb.HistoryTaskAttributes{
382 > NamespaceId: taskInfo.NamespaceID,
383 > WorkflowId: taskInfo.WorkflowID,
384 > RunId: taskInfo.RunID,
385 > BaseExecutionInfo: currentBaseWorkflowInfo,
386 > VersionHistoryItems: currentVersionHistory,
387 > Events: events,
388 > EventsBatches: eventsBatches,
389 > NewRunEvents: newEvents,
390 > NewRunId: taskInfo.NewRunID,
391 > },
392 > },
393 > VisibilityTime: timestamppb.New(taskInfo.VisibilityTimestamp),
394 > }, nil
395 }
396
463 return nil, nil, nil, err
464 }
465 > if versionHistory == nil { raw_task_converter.go
466 return nil, nil, nil, nil
467 }
468 > eventBatches, err := getEventsBlob(ctx, shardID, branchToken, firstEventID, nextEventID, executionManager) raw_task_converter.go
469 > if err != nil {
470 return nil, nil, nil, convertGetHistoryError(workflowKey, logger, err)
471 }
472 > return versionHistory, eventBatches, baseWorkflowInfo, nil raw_task_converter.go
473 }
474
503 return nil, nil, nil, nil, err
504 }
505 > if versionHistory == nil { raw_task_converter.go
506 return nil, nil, nil, nil, nil
507 }
508
509 > var newEvents *commonpb.DataBlob raw_task_converter.go
510 > if len(newRunID) != 0 {
511 newVersionHistory, newEventBlob, _, err := getVersionHistoryAndEvents(
512 ctx,
534 }
535 }
536 > return versionHistory, eventBatches, newEvents, baseWorkflowInfo, nil raw_task_converter.go
537 }
538
564 ms, err := wfContext.LoadMutableState(ctx, shardContext)
565 switch err.(type) {
566 > case nil: raw_task_converter.go
567 > return persistence.GetXDCCacheValue(ms.GetExecutionInfo(), eventID, eventVersion)
568 case *serviceerror.NotFound, *serviceerror.NamespaceNotFound:
569 return nil, nil, nil, nil
580 nextEventID int64,
581 executionManager persistence.ExecutionManager,
582 > ) ([]*commonpb.DataBlob, error) { raw_task_converter.go
583 > var eventBatchBlobs []*commonpb.DataBlob
584 > var pageToken []byte
585 > req := &persistence.ReadHistoryBranchRequest{
586 > BranchToken: branchToken,
587 > MinEventID: firstEventID,
588 > MaxEventID: nextEventID,
589 > PageSize: 1,
590 > NextPageToken: pageToken,
591 > ShardID: shardID,
592 > }
593 >
594 > for {
595 > resp, err := executionManager.ReadRawHistoryBranch(ctx, req)
596 > if err != nil {
597 return nil, err
598 }
599
600 > req.NextPageToken = resp.NextPageToken raw_task_converter.go
601 > eventBatchBlobs = append(eventBatchBlobs, resp.HistoryEventBlobs...)
602 >
603 > if len(req.NextPageToken) == 0 {
604 > break
605 }
606 }
607
608 > return eventBatchBlobs, nil raw_task_converter.go
609 }
610
go.temporal.io/server/service/history/workflow/mutable_state_impl.go 5 introduced LOC · 2 ranges

Open complete file

7899 // transaction closed without any state change
7900 if len(ms.executionInfo.TransitionHistory) == 0 {
7901 > return mutable_state_impl.go
7902 > }
7903
7904 currentVersionedTransition := ms.CurrentVersionedTransition()
8057
8058 if len(ms.executionInfo.TransitionHistory) == 0 {
8059 > // in an unknown state mutable_state_impl.go
8060 > return
8061 > }
8062
8063 var tombstones []*persistencespb.StateMachineTombstone
go.temporal.io/server/service/history/replication/ack_manager.go 2 introduced LOC · 1 range

Open complete file

336 continue
337 }
338 > lastTaskID = task.GetTaskID() ack_manager.go
339 > replicationTasks = append(replicationTasks, replicationTask)
340 }
341