task_queue_partition_manager.go ×6

Frontier kind: Code frontier

unlabeled · c_3205fb326d14

150 tests · 4451 LOC · 178 files · introduces 0 tests · 33 LOC · 2 files

Introduces — evidence that enters the hierarchy at this concept

Code
9 ranges33 lines · 2 files
Tests
0 tests

Contains — complete concept membership

All code (extent)
817 ranges4451 lines · 178 files · Browse complete extent
All tests (intent)
150 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.

2 files ranked by introduced lines: 33 introduced LOC across 9 ranges. Expand a file to inspect source; the > gutter marks introduced lines.

go.temporal.io/server/service/matching/task_queue_partition_manager.go 27 introduced LOC · 6 ranges

Open complete file

950 task *internalTask,
951 backlogQueue *PhysicalTaskQueueKey,
953 > taskInfo := task.event.GetData()
954 > // This task came from taskReader so task.event is always set here.
955 > directive := taskInfo.GetVersionDirective()
956 > assignedBuildId := backlogQueue.Version().BuildId()
957 > if assignedBuildId != "" {
958 // construct directive based on the build ID of the spool queue
959 directive = worker_versioning.MakeBuildIdDirective(assignedBuildId)
960 }
961 > newBacklogQueue, syncMatchQueue, _, taskDispatchRevisionNumber, targetVersion, err := pm.getPhysicalQueuesForAdd( task_queue_partition_manager.go
962 > ctx,
963 > directive,
964 > nil,
965 > taskInfo.GetRunId(),
966 > taskInfo.GetWorkflowId(),
967 > false,
968 > )
969 > if err != nil {
970 return err
971 }
972
973 > task.targetWorkerDeploymentVersion = targetVersion task_queue_partition_manager.go
974 >
975 > // Update the task dispatch revision number on the task since the routingConfig of the partition
976 > // may have changed after the task was spooled.
977 > task.taskDispatchRevisionNumber = taskDispatchRevisionNumber
978 >
979 > // set redirect info if spoolQueue and syncMatchQueue build ids are different (V2 versioning)
980 > if assignedBuildId != syncMatchQueue.QueueKey().Version().BuildId() {
981 task.redirectInfo = &taskqueuespb.BuildIdRedirectInfo{
982 AssignedBuildId: assignedBuildId,
983 }
985 // make sure to reset redirectInfo in case it was set in a previous loop cycle
986 task.redirectInfo = nil
987 }
988 // mark if task is being redirected from queue it was read from (V2 or V3 versioning)
989 > task.redirectedFromBacklog = syncMatchQueue.QueueKey() != backlogQueue task_queue_partition_manager.go
990 > if !backlogQueue.version.Deployment().Equal(newBacklogQueue.QueueKey().version.Deployment()) {
991 // Backlog queue has changed, spool to the new queue. This should happen rarely: when
992 // activity of pinned workflow was determined independent and sent to the default queue
go.temporal.io/server/service/matching/physical_task_queue_manager.go 6 introduced LOC · 3 ranges

Open complete file

591 }
592
593 > func (c *physicalTaskQueueManagerImpl) AddSpooledTask(task *internalTask) error { physical_task_queue_manager.go
594 > return c.partitionMgr.AddSpooledTask(c.tqCtx, task, c.queue)
595 > }
596
597 > func (c *physicalTaskQueueManagerImpl) AddSpooledTaskToMatcher(task *internalTask) error { physical_task_queue_manager.go
598 > if c.priMatcher == nil {
599 softassert.Fail(c.logger, "AddSpooledTaskToMatcher called on old matcher")
600 return errInternalMatchError
601 }
602 > return c.priMatcher.AddTask(task) physical_task_queue_manager.go
603 }
604